summaryrefslogtreecommitdiff
path: root/lib/support/nginx/gitlab-ssl
diff options
context:
space:
mode:
authortiagonbotelho <tiagonbotelho@hotmail.com>2016-07-18 14:59:12 +0100
committertiagonbotelho <tiagonbotelho@hotmail.com>2016-07-18 14:59:12 +0100
commit50f3d0d4f1392b3e45abe623506965016889cf8b (patch)
tree5e0dff94916042d4a3a33ffb4f42f21bd0d10535 /lib/support/nginx/gitlab-ssl
parentc6097f24d32610d4c12ae0e9d16b72dc53cda9da (diff)
parent017ae313dc84682e260e960f93fb4a55af0df523 (diff)
downloadgitlab-ce-50f3d0d4f1392b3e45abe623506965016889cf8b.tar.gz
Merge branch 'master' into rename-repo-files
Diffstat (limited to 'lib/support/nginx/gitlab-ssl')
-rw-r--r--lib/support/nginx/gitlab-ssl7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/support/nginx/gitlab-ssl b/lib/support/nginx/gitlab-ssl
index bf014b56cf6..0b93d7f292f 100644
--- a/lib/support/nginx/gitlab-ssl
+++ b/lib/support/nginx/gitlab-ssl
@@ -93,7 +93,12 @@ server {
proxy_http_version 1.1;
- proxy_set_header Host $http_host;
+ ## By overwriting Host and clearing X-Forwarded-Host we ensure that
+ ## internal HTTP redirects generated by GitLab always send users to
+ ## YOUR_SERVER_FQDN.
+ proxy_set_header Host YOUR_SERVER_FQDN;
+ proxy_set_header X-Forwarded-Host "";
+
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Ssl on;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;