Giter VIP home page Giter VIP logo

jupyter_http_over_ws's Introduction

Jupyter HTTP-over-WebSocket

This Jupyter server extension allows running Jupyter notebooks that use a WebSocket to proxy HTTP traffic. Browsers do not allow cross-domain communication to localhost via HTTP, but do support cross-domain communication to localhost via WebSocket.

Installation and Setup

Run the following commands in a shell:

pip install jupyter_http_over_ws
# Optional: Install the extension to run every time the notebook server starts.
# Adds a /http_over_websocket endpoint to the Tornado notebook server.
jupyter serverextension enable --py jupyter_http_over_ws

Usage

New notebook servers are started normally, though you will need to set a flag to explicitly trust WebSocket connections from the host communicating via HTTP-over-WebSocket.

jupyter notebook \
  --NotebookApp.allow_origin='https://www.example.com' \
  --port=8081

Note: Before requests will be accepted by your Jupyter notebook, make sure to open the browser window specified in the command-line when the notebook server starts up. This will set an auth cookie that is required for allowing requests (http://jupyter-notebook.readthedocs.io/en/stable/security.html).

Troubleshooting

Receiving 403 errors when attempting connection

If the auth cookie isn't present when a connection is attempted, you may see a 403 error. To help prevent these types of issues, consider starting your Jupyter server using the --no-browser flag and open the provided link that appears in the terminal from the same browser that you would like to connect from:

jupyter notebook \
  --NotebookApp.allow_origin='https://www.example.com' \
  --port=8081
  --no-browser

If you still see issues, consider retrying the above steps from an incognito window which will prevent issues related to browser extensions.

Uninstallation

The jupyter server extension can be disabled and removed by running the following commands in a shell:

jupyter serverextension disable --py jupyter_http_over_ws
pip uninstall jupyter_http_over_ws

Contributing

If you have a problem, or see something that could be improved, please file an issue. However, we don't have the bandwidth to support review of external contributions, and we don't want user PRs to languish, so we aren't accepting any external contributions right now.

jupyter_http_over_ws's People

Contributors

colaboratory-team avatar craigcitro avatar blois avatar

Stargazers

brenna avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.