-
Notifications
You must be signed in to change notification settings - Fork 42
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
Fix landing page URL #519
Fix landing page URL #519
Conversation
Codecov Report
@@ Coverage Diff @@
## master #519 +/- ##
==========================================
- Coverage 91.55% 91.51% -0.05%
==========================================
Files 62 62
Lines 3127 3123 -4
==========================================
- Hits 2863 2858 -5
- Misses 264 265 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
The same is true if I add a Of course, using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cheers @shyamd
I wonder if the utility function get_base_url
should support both parsed url instances as well as str
, parsing it in the function itself... It would probably remove a couple of lines in the code overall - perhaps? But this can be done in another PR.
Instead of parseing the `request.url` using urllib, simply use `request.url`, which is a `starlette.datastructures.URL` that is similar to a `ParsedUrl` from `urllib`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should fix the endpoint URLs on the landing page to use the proper base_url rather than what comes in from the request.
EDIT: clearly the commit names are screwed up. One is for fixing the landing page and the other ensures
get_base_url
returns consistent base URLs without the trailing slash.Closes #371.