fix: Support APP_ROOT_PATH for static file serving #858
+8
β3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
π Bug-fix PR
Before opening this PR please:
make lint
- passesruff
,mypy
,pylint
make test
- all unit + integration tests greenmake coverage
- β₯ 90 %make docker docker-run-ssl
ormake podman podman-run-ssl
π Summary
This PR fixes static file serving when APP_ROOT_PATH is configured, ensuring that static assets (CSS, JS) are correctly
mounted and accessible when the application is deployed behind a reverse proxy with a custom base path.
π Reproduction Steps
π Root Cause
When APP_ROOT_PATH was configured for reverse proxy deployments, static files were still mounted at /static instead of {APP_ROOT_PATH}/static, causing the browser to request assets at the wrong path and resulting in 404 errors.
π‘ Fix Description
Modified the static file mounting logic to:
π§ͺ Verification
make lint
make test
make coverage
π MCP Compliance (if relevant)
β Checklist
make black isort pre-commit
)