Skip to content

Commit

Permalink
fix!: update nginx config to use $host instead of $http_host
Browse files Browse the repository at this point in the history
Fixes medium risk issue discovered with gixy
  • Loading branch information
sesh committed Jul 4, 2023
1 parent 58b7545 commit ad85980
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ansible/roles/nginx/templates/nginx_django.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ server {

location / {
proxy_pass_header Server;
proxy_set_header Host $http_host;
proxy_set_header Host $host;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/nginx/templates/nginx_django_ssl.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ server {

location / {
proxy_pass_header Server;
proxy_set_header Host $http_host;
proxy_set_header Host $host;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Expand Down

0 comments on commit ad85980

Please sign in to comment.