Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proxito: pass unresolved domain in request #9982
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
Proxito: pass unresolved domain in request #9982
Changes from all commits
b231b6e
b64f9a7
150c052
95339b6
ce6b38b
c8105f1
8ed4dc4
d177edd
9b00ad3
ebf3f7f
bf18298
d8b27fb
07472d3
eff0dfa
7bed72d
c7034a6
d50e853
12108ac
9edad43
e5ac638
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Only the
canonicalize
attributes are set here now, but I think we should be able to move these to the serve_docs view, since there is the only place we make use of them, maybe the http to https redirect could be done at the middleware level.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.
Shouldn't we have a bigger object? I'd like to inject one and only one object to the request with a known structure. As an example:
What do you think?
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.
We are using these attributes in the docs view only, moving all the logic to the docs view serving should be easier
readthedocs.org/readthedocs/proxito/views/serve.py
Lines 141 to 160 in f607db6
Once that is moved, not sure if there is anything else that we will need to inject in the request, but if we have the need, I'd be fine creating another object.