martyngigg commented on PR #30134: URL: https://github.com/apache/superset/pull/30134#issuecomment-2598763722
> > Yes this is also annoying. Now I'm a bit more familiar with the code base I wondered about including it in superset/views/base.py#L333 `bootstrap_data` config dictionary that is rendered into the templates? Anyone know if this is a good/bad idea? > > Hi @martyngigg from me point of view, it looks like the perfect place, but I'm no Superset developer. > > I've been playing around quite a bit on this topic, but am still struggling about dynamic configuration of the path prefix for the frontend (i.e. without dedicated build). Did you make progress on your side ? Hi @jeanpommier, I've managed to make a little progress with this. Firstly I've improved the situation with the backend such that its no longer the reverse-proxy that strips the prefix. I've added a middleware on the Flask app that does it so now the prefix is understood by the application so it works with the Flask dev server, gunicorn and Nginx. [Changeset](https://github.com/martyngigg/superset/commit/a84951a1e078ac8bf6bf4cdd90662dacce144cf6) Secondly, I've got a work in progress [commit](https://github.com/martyngigg/superset/commit/328b0adc9be8416fe22524ba9f2bb33f090a7784) that attempts to push the `application_root` through the bootstrap data now that the app knows about it. It mostly works with the exception of issues with stylesheet imports through webpack that generate the wrong path. I need to explore further but the webpack [docs](https://github.com/webpack/docs/wiki/configuration#outputpublicpath) suggest `__webpack_public_path__` might be a way to go. and also improved the backed to remove the need for stripping. I've successfully implemented a small middleware class in the backend -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
