Say I have a website http://example_dot_com and I want to use Dash to show some nice graphs. I want to host these graphs under http://example_dot_com/cool_data. I don’t want to re-build my entire website using dash. I was thinking that I could use nginx to specify a proxy such that /cool_data goes to host_running_dash:8050. I have gotten that part working using this slightly adapted example from the gunicorn website:
server {
listen 80;
server_name example_dot_com;
location /cool_data {
proxy_pass http://127.0.0.1:8050;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
The problem now is that the client is making requests for things like /_dash-dependencies
and /_dash-layout
rather than /cool_data/_dash-dependencies
. I’m assuming that these requests are based on the content that is being returned when http://example_dot_com/cool_data is visited. Is there any way to inform Dash that it’s being hosted under a different URL? Or is my strategy here totally wrong?