sadpandajoe commented on code in PR #43169:
URL: https://github.com/apache/superset/pull/43169#discussion_r3819078249
##########
superset/app.py:
##########
@@ -242,4 +242,12 @@ def __call__(
environ["PATH_INFO"] = original_path_info[len(self.app_root) :]
environ["SCRIPT_NAME"] = self.app_root
return self.wsgi_app(environ, start_response)
+ if original_path_info == "/static" or
original_path_info.startswith("/static/"):
+ # Webpack bakes `/static/assets/` into the bundle as its
publicPath,
+ # so lazily loaded chunks and the assets they reference are always
+ # requested without the app-root prefix. Serve those unprefixed
+ # paths as-is instead of 404ing them; the app root is left off
+ # PATH_INFO and SCRIPT_NAME because the static route is registered
+ # at `/static/...` on the unprefixed app.
+ return self.wsgi_app(environ, start_response)
Review Comment:
Agreed—the bundled nginx configuration never forwards root-level `/static`
requests, so app-root deployments still 404 lazy chunks after this change.
Should the proxy configuration forward `/static` too?
--
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]