-
-
Notifications
You must be signed in to change notification settings - Fork 762
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
Add X-Original-URI support #826
Conversation
hey @Jyhess did you happen to see #823 ? |
@dtkav I had a look on your PR, but didn't understand how you succeed to get path part modified by the reverse proxy. Can you give me a hint ? Using an header make a solution generic, dynamic and configurable for all modern reverse proxy. But I agree with you the header name should be configurable and documented. |
95584a1
to
bd18b18
Compare
@dtkav Looking example you added in your last commit, I understand we are not trying to fix the same issue.
By the way, this will not solve #527 as I guessed originally. Do you think I should open a different issue with my use case explained ? |
1b1ee22
to
9433d75
Compare
I replaced cookbook minimal example with a more complete one in |
@Jyhess thanks for laying out the issue so clearly. Please have another look at the example I posted - I forgot to add the file where all the magic was happening :) I believe it supports your use case by passing the header Let me know if I'm still missing something! |
@dtkav Review your example with the magic part. It works nicely for Flask using X-Script-Name header, but not for aiohttp, which is my use case. What I can do, is to port header based solution for AioHttp in your branch, with header name alignment, and keep your solution for Flask. Do you agree with this plan ? Note your |
@Jyhess my mistake - I didn't realize your use case was with aiohttp (which I'm not very familiar with).
I don't think Many users will be using reverse proxies, and they will often need to rely on this type of functionality (access to incoming path, scheme, host). If it is implemented with the primitives available from the underlying web framework, then it's available in the handler functions. If the user understands the framework well, they won't have to learn anything new.
Ok, that makes sense. I didn't even realise that aiohttp had a wsgi compatibility layer at one point. For aiohttp, I think the best way to do this is to set the So, to sum up:
I appreciate your clear communication style. Hopefully I'm making sense too 😁 Let me know what you think! |
I think I got it working with aiohttp in #823 today. |
Good catch for aiohttp-remotes. I missed it during my own research. |
Thanks for the collaboration @Jyhess ! |
Thanks to you Daniel.
Le dim. 13 janv. 2019 à 01:45, Daniel Grossmann-Kavanagh <
notifications@github.com> a écrit :
… Thanks for the collaboration @Jyhess <https://github.com/Jyhess> !
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#826 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYB-oDyggRMcw-kSicUFef9AmDOWWcQ4ks5vCoGtgaJpZM4ZWs-E>
.
|
Fixes #527 .
Changes proposed in this pull request: