mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge pull request #484 from georgejhunt/jhubfix
Sync from georgejhunt/iiab:jhubfix
This commit is contained in:
commit
053eff98a8
2 changed files with 33 additions and 18 deletions
|
@ -1,20 +1,26 @@
|
||||||
location /jupyterhub {
|
location /jupyterhub {
|
||||||
proxy_pass http://127.0.0.1:8000;
|
proxy_pass http://127.0.0.1:8000;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-NginX-Proxy true;
|
proxy_set_header X-NginX-Proxy true;
|
||||||
|
}
|
||||||
|
|
||||||
# websocket headers
|
# Managing WebHook/Socket requests between hub user servers and external proxy
|
||||||
proxy_http_version 1.1;
|
location ~* /(api/kernels/[^/]+/(channels|iopub|shell|stdin)|terminals/websocket)/? {
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_pass http://127.0.0.1:8000;
|
||||||
#proxy_set_header Connection $connection_upgrade;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Scheme $scheme;
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|
||||||
proxy_buffering off;
|
# WebSocket support
|
||||||
}
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
# Managing requests to verify letsencrypt host
|
proxy_set_header Connection $connection_upgrade;
|
||||||
location ~ /.well-known {
|
proxy_set_header X-Scheme $scheme;
|
||||||
allow all;
|
proxy_buffering off;
|
||||||
}
|
}
|
||||||
|
# Managing requests to verify letsencrypt host
|
||||||
|
location ~ /.well-known {
|
||||||
|
allow all;
|
||||||
|
}
|
||||||
|
|
|
@ -67,6 +67,15 @@ http {
|
||||||
# gzip_buffers 16 8k;
|
# gzip_buffers 16 8k;
|
||||||
# gzip_http_version 1.1;
|
# gzip_http_version 1.1;
|
||||||
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||||
|
|
||||||
|
# top-level http config for websocket headers
|
||||||
|
# If Upgrade is defined, Connection = upgrade
|
||||||
|
# If Upgrade is empty, Connection = close
|
||||||
|
map $http_upgrade $connection_upgrade {
|
||||||
|
default upgrade;
|
||||||
|
'' close;
|
||||||
|
}
|
||||||
|
|
||||||
##
|
##
|
||||||
# Virtual Host Configs
|
# Virtual Host Configs
|
||||||
##
|
##
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue