rgbkrk / ipython-notebook-cookbook

:book: IPython Notebook Cookbook for Deployment via Chef
Apache License 2.0
41 stars 10 forks source link

Websocket issue when using nginx proxy #15

Open rayrod2030 opened 9 years ago

rayrod2030 commented 9 years ago

After loading iPython notebook using the default attributes from the Vagrantfile I was getting the following error:

WebSocket connection failed: A WebSocket connection to could not be established. You will NOT be able to run code. Check your network connection or notebook server configuration.

I found this stackoverflow post that describes the issue: http://stackoverflow.com/questions/22665809/how-to-configure-ipython-behind-nginx-in-a-subpath

And based on that post this nginx config seems to address the issue: proxy_set_header Origin "";

I'll be submitting a PR to fix this.

rayrod2030 commented 9 years ago

Fixed with PR https://github.com/rgbkrk/ipython-notebook-cookbook/pull/16

rgbkrk commented 9 years ago

Thank you for reporting this.

There's got to be another way to fix this, since disabling Origin checks opens you up to issues and jupyter/tmpnb-deploy uses nginx as well.