handle assets and requests_pathname_prefix
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 24.4k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 13
Description
So I currently have an API Gateway serving my Dash app under the /dev/ base path.
I have specified my Dash.dash app with
app.config.update({
# as the proxy server will remove the prefix
"routes_pathname_prefix": "/",
# the front-end will prefix this string to the requests
# that are made to the proxy server
'requests_pathname_prefix': '/dev/'
})
and most the app renders fine however, I noticed that the files in my assets directory are not being found since when the app loads, its looking in /assets/ instead of /dev/assets.
This seems like a quick fix on my part, but I'm not sure where to start since this library is so new to me.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Dash app behind an API Gateway at the /dev/ base path using the shown routes_pathname_prefix and requests_pathname_prefix settings. Trace how the assets directory URLs are generated and verify that asset requests use /dev/assets while the existing root-path behavior remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100