Skip to content

Commit

Permalink
add additional reverse proxy headers that might improve compability f…
Browse files Browse the repository at this point in the history
…or containerized apps
  • Loading branch information
Michel Käser committed Aug 11, 2015
1 parent 5e51859 commit 92b4e27
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lib/confs/nginx/ipynbsrv.conf
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ server {
# use the Django error pages
# forbidden = 404 so the user doesn't know there is a container
# 50x grouped to 500
error_page 403 404 /error/404;
error_page 500 502 503 504 /error/500;
error_page 403 404 /error/404;
error_page 500 502 503 504 /error/500;

# needed for websockets connections
proxy_http_version 1.1;
Expand All @@ -79,10 +79,12 @@ server {
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;

proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Protocol $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Protocol $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Script-Name /$1/;

proxy_pass http://$decoded_backend;
}
Expand Down

0 comments on commit 92b4e27

Please sign in to comment.