Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure urljoins with base_url use relative paths #142

Closed
lossyrob opened this issue May 27, 2021 · 0 comments · Fixed by #143
Closed

Ensure urljoins with base_url use relative paths #142

lossyrob opened this issue May 27, 2021 · 0 comments · Fixed by #143

Comments

@lossyrob
Copy link
Member

In several instances a urljoin is used with Fast API's base_url, where a leading / is used during the join. This works if there's no root_path set, but in the case where base_url contains a path prefix, the leading / makes the resulting join based on the host information and disregards the root_path.

Examples:
BaseLinks.root - joining to "/" erases the root_path, should just use str(self.base_url)

The goal of this issue is to find all the instances where a urljoin is used with a leading slash, and joining to a relative path instead (or avoiding a join in the case where the base_url can be used directly).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant