Skip to content

Commit

Permalink
Revert "Defend against 'Host' header injection"
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobvosmaer committed Aug 8, 2016
1 parent af9127e commit 427c9f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
7 changes: 1 addition & 6 deletions lib/support/nginx/gitlab
Expand Up @@ -49,12 +49,7 @@ server {

proxy_http_version 1.1;

## 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 Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
Expand Down
7 changes: 1 addition & 6 deletions lib/support/nginx/gitlab-ssl
Expand Up @@ -93,12 +93,7 @@ server {

proxy_http_version 1.1;

## 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 Host $http_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;
Expand Down

0 comments on commit 427c9f0

Please sign in to comment.