Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Use relative path for url_for #293

Merged
merged 2 commits into from
Dec 1, 2023
Merged

Use relative path for url_for #293

merged 2 commits into from
Dec 1, 2023

Conversation

pamelafox
Copy link
Collaborator

@pamelafox pamelafox commented Dec 1, 2023

The FastAPI url_for comes from Starlette and produces an absolute URL, but that URL isnt accurate when youre behind a proxy like Codespaces. This overrides it to use relative URLs instead.

See encode/starlette#843

Fixes Azure-Samples/azure-fastapi-postgres-flexible-aca#13

@pamelafox
Copy link
Collaborator Author

This PR also adds an init.py file that was missing

@pamelafox pamelafox merged commit 19a6358 into main Dec 1, 2023
1 check passed
@pamelafox pamelafox deleted the urlfor branch December 1, 2023 17:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Abnormal running fastapi app on CodeSpace
2 participants