Skip to content

WIP: Initial framework of Pages custom domains in pages

Nick Thomas requested to merge (removed):add-custom-pages-domain-support into master

The idea here is that Workhorse opens a second listener, which can be exposed to the outside world - either directly, or via a TCP proxy.

This listener is designed to serve custom Pages domains. To do so, it asks GitLab upstream for a key + certificate to terminate the HTTPS connection with, based on the client-provided SNI.

Once the connection is established, the client can perform HTTP requests as usual. Workhorse directs those requests to GitLab, which serves them. The idea here is to bypass the existing gitlab-pages daemon, instead replicating most of its logic within the gitlab-ce codebase as a few simple controllers.

The only part of the Pages daemon that can't be done directly by gitlab-ce is serving certificates for custom Pages domains, which is why we have this MR.

The NGINX configuration will need to change significantly. Currently, any unknown domains are sent to the Pages daemon; instead, they should be sent to workhorse. Of course, we still need to implement support in gitlab-ce as well.

Merge request reports