diff --git a/conf/nginx.conf b/conf/nginx.conf index fb6260f..3d9e016 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -6,4 +6,20 @@ location __PATH__/ { include conf.d/yunohost_panel.conf.inc; proxy_set_header Accept-Encoding ""; +} + + +location ~* __PATH__/(api/kernels/[^/]+/(channels|iopub|shell|stdin)|terminals/websocket)/? { + proxy_pass http://localhost:__PORT__; + + 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_http_version 1.1; + + #proxy_set_header Upgrade $http_upgrade; + proxy_set_header Upgrade "websocket"; + proxy_set_header Connection "upgrade"; + proxy_read_timeout 86400; } \ No newline at end of file