Skip to content

Commit

Permalink
better container access regex; buffering can lead to problems
Browse files Browse the repository at this point in the history
  • Loading branch information
michelkaeser committed Aug 12, 2015
1 parent ff0c6bb commit 10d94a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/confs/nginx/ipynbsrv.conf
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ server {
}

# proxy/workspace location
location ~* /ct/([^\/]+)/(.*) {
location ~* /ct/([^\/]+)(\/.*)?$ {
# authorization
# ensure only container's owner can access it
satisfy all;
Expand All @@ -79,6 +79,7 @@ server {
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;

# headers for the upstream server
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Expand All @@ -88,6 +89,7 @@ server {
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Script-Name /ct/$1;

proxy_buffering off;
proxy_pass http://$decoded_backend;
}
}

0 comments on commit 10d94a1

Please sign in to comment.