-
Notifications
You must be signed in to change notification settings - Fork 14k
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
remove hard code http scheme of short url #4656 #4886
Conversation
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.
Wondering if we can use flask's url_for instead of building the url manually
something like this ? (I never use url_for)
|
@ripoul i think it would be more complicated than that to have the full url with scheme and host. Don't mind that, we can cleanup that later. |
how can I make the test succeed ? |
@ripoul you fix what hey report: that means that you have to readd the 4 spaces indentation you removed :) |
Codecov Report
@@ Coverage Diff @@
## master #4886 +/- ##
=======================================
Coverage 76.97% 76.97%
=======================================
Files 44 44
Lines 8537 8537
=======================================
Hits 6571 6571
Misses 1966 1966
Continue to review full report at Codecov.
|
@xrmx done ! ty for your help ! 😃 |
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.
Would you mind elaborating in the PR description as to why/when the hard coded “http” string is problematic? This would help provide reviewers with additional context.
for your first question : it's a probleme when your server accept only https request. In this case we would like to respond with the same scheme than the request to be sure the server can handle it. |
* remove hard code http scheme of short url apache#4656 * remove space * add space * remove temp var
* remove hard code http scheme of short url apache#4656 * remove space * add space * remove temp var
* remove hard code http scheme of short url apache#4656 * remove space * add space * remove temp var
remove the hard code http. get the scheme of the request and use it to create the new url