Open tdpetrou opened 4 years ago
Fantastic. Been trying for hours to find the right combination of flags to make this work.
This is really worth documenting.
But, I wanted to ask about a "more elegant" solution, something I have seen working in r shiny.
The above solution will make the app work via the Reverse Proxy, but not natively (where the extra prefix breaks the links).
If Dash links were relative to the location of the first page, then the same app could work in both cases (or via multiple proxies). I am sure there must be a good reason why the links in the html are absolute and not relative and I have no idea what is the tradeoff, but worth adding this to the doc as well.
Now that I know, I can find examples and some sort of documentation
https://github.com/plotly/dash-recipes/blob/master/dash-routes-config.py https://github.com/plotly/dash/issues/179
I write tutorials and do lots of live teaching and gravitate mostly to using Jupyter Notebooks, which allow for text and code to be integrated together in one. Using dash on a local instance of Jupyter is essentially no different than using it from a normal .py file.
But, when teaching to people that have no local jupyter instance or don't even have python installed, I've turned to Binder which relies on JupyterHub.
It took some searching, but I found some github issues and forum posts that informed me I had to set
requests_pathname_prefix
of theconfig
dictionary like this.Would be great if this was officially documented somewhere. Thanks and this is a great product. I'm doing a meetup on it in Houston on Jan 2 (apologies if this is self promotion, so no link provided).