jupyter-dash icon indicating copy to clipboard operation
jupyter-dash copied to clipboard

Does jupyter-dash support https?

Open kdzhao opened this issue 3 years ago • 1 comments

I noticed it works good on my local environment, but in the actual environment, nothing shows up in the UI. And by using F12 on my Chrome, I see this error (I was trying to use port 2000 in this example):

The page at 'https://myserver/user/myid/lab/tree/myid/my-notebook.ipynb' was loaded over HTTPS, but requested an insecure frame 'http://myserver:2000/'. This request has been blocked; the content must be served over HTTPS.

And checking the docs here, I don't see https is mentioned anywhere.

Thanks

kdzhao avatar Mar 04 '22 02:03 kdzhao

I can confirm that it can work with https (at least on z2jh). It works over the extension jupyter-server-proxy, which redirects ports via https://myserver/user/myid/proxy/.

umutkaya-ugent avatar Apr 30 '22 21:04 umutkaya-ugent

Having the same issue it seems. I am trying to get an embedded plot in an iFrame working in some production/server environment.

Although I am using some additional packages (voila for serving the notebook, plotly, plotly-resampler for the figures), it seems like under the hood the problem is a JupyterDash server which should be serving the iFrame content via https.

Did anyone get this working with https?

Blubbaa avatar Jun 27 '23 12:06 Blubbaa

JupyterDash has been merged with main Dash package, if this is still an issue after trying the following, please open a new one on https://github.com/plotly/dash.

Without configuration, http is always used and the server_url will be http://{host}.{port}. This can be changed by:

  • Setting DASH_DOMAIN_BASE environment variable, the url will then be formatted as https://{domain_base}.
  • Calling JupyterDash.infer_jupyter_proxy_config could work if it can the proxy server_url from it, need the base notebook extension or jupyterlab extension built and active.
  • Set parameter server_url for JupyterDash.run or jupyter_server_url for Dash.run to use that url as is.

T4rk1n avatar Jun 27 '23 13:06 T4rk1n