The source project of this merge request has been removed.
Add support for reverse proxy
This MR make gitlab-pages daemon parse the X-Forwarded-Host header and use it in a reverse proxy setup. According to https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host X-Forwarded-Host is the de-facto standard header to pass the requested hostname in a reverse-proxy-setup.
-
Build daemon
make -
Run daemon
./gitlab-pages -listen-proxy 0.0.0.0:8081 -log-verbose -
Test daemon
curl -H "X-Forwarded-Host: group.gitlab-example.com" localhost:8081/index.html # => OK
I also verified the functionality by copying the binary into the standard docker container of Gitlab CE.
Edited by maxmeyer