handle assets and requests_pathname_prefix
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 24.4k
- Forks
- 2.3k
- Ø Merge
- 2 T. 7 Std.
- Gemergte PRs (30 T.)
- 13
Beschreibung
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, die Dash-App hinter einem API Gateway am Basispfad /dev/ anhand der gezeigten Einstellungen routes_pathname_prefix und requests_pathname_prefix nachzubilden. Verfolge, wie die URLs für das assets-Verzeichnis generiert werden, und überprüfe, dass Asset-Anfragen /dev/assets verwenden, während das bestehende Verhalten für den Root-Pfad korrekt bleibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- web-dev
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 42/100