Created
May 27, 2021 16:47
-
-
Save M3nin0/1ffd36bdebb4f3465683d1e71313347b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location /my-jupyter/ { | |
proxy_pass http://my-jupyter:8000; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_read_timeout 90; | |
add_header Access-Control-Allow-Origin *; | |
} | |
location ~* /my-jupyter/.+\/.+\/(api/kernels/[^/]+/(channels|iopub|shell|stdin)|terminals/websocket)/? { | |
proxy_pass http://my-jupyter:8000; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
# WebSocket support | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade "websocket"; | |
proxy_set_header Connection "Upgrade"; | |
proxy_read_timeout 86400; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment