I have resolved the issue. It is actually two folds/steps process:
-
Configure NGINX proxy
-
Setting c.NotebookApp.allow_origin = '*'
-
For server directive that is listening on 443 ssl:
location / {
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;
set $upstream_app jupyter-tensorflow-notebook;
set $upstream_port 8888;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
proxy_read_timeout 90;
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
- Then update jupyter_notebook_config.py and set c.NotebookApp.allow_origin = ‘*’ there.