From 10d94a1c9058260f69b1bd221e555dbad701228a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20Ka=CC=88ser?= Date: Wed, 12 Aug 2015 18:18:20 +0200 Subject: [PATCH] better container access regex; buffering can lead to problems --- lib/confs/nginx/ipynbsrv.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/confs/nginx/ipynbsrv.conf b/lib/confs/nginx/ipynbsrv.conf index c2bca92..38724b8 100644 --- a/lib/confs/nginx/ipynbsrv.conf +++ b/lib/confs/nginx/ipynbsrv.conf @@ -56,7 +56,7 @@ server { } # proxy/workspace location - location ~* /ct/([^\/]+)/(.*) { + location ~* /ct/([^\/]+)(\/.*)?$ { # authorization # ensure only container's owner can access it satisfy 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; @@ -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; } }