-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Added docs on how to configure the reverse proxy for a subfolder & Documented the usage of X-Forwared-Prefix #19128
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
Conversation
Let me ask for a quick review to @dbu because I know that David has battled with many proxies, so maybe he can share some insights here. Thanks! |
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.
seems good to me. i never needed to use this functionality myself, but it makes sense.
i think the documentation section could be a bit more concrete to avoid confusion
deployment/proxies.rst
Outdated
Reverse proxy in a subpath / subfolder | ||
-------------------------------------- | ||
|
||
If you configure the reverse proxy in such a way that the Symfony application is |
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.
if i understand correctly, this is about the proxy routing to symfony for /subpath
, but symfony itself running on /
? in a way this is the only thing that makes sense for this documentation, nonetheless i would make that more explicit. you could start with the example and explicitly explain that the symfony application runs at /
, and give the example of what absolute paths/urls should be.
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.
@jbtronics if possible, please add a phrase or two as a short introduction to the exact problem that this solves, as asked by David. Thanks!
I added an example. I hope the explaination is now a bit more clear and explict. @dbu |
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.
looks correct and understandable now 👍
@javiereguiluz I've rewrote the first sentences. I hope its more clear now. |
…cumented the usage of X-Forwared-Prefix
5a9445e
to
06a9da6
Compare
Jan, this is finally merged! Thanks a lot for contributing this to the docs. It's an uncommon feature ... but folks using this will definitely appreciate your explanation. Thanks also to David for the review! |
If you want to put a symfony application behind a reverse proxy which is configured the application in a subfolder, then this is supported by setting the non-standard
X-Forwarded-Prefix HTTP header
. This was already added in Symfony 5.2. However, this is nowhere documented and no good solution on how to achieve this goal is found on the internet. This commit adds documentation on how to use this header.This should apply to all Symfony versions (at least from 5.4 upwards)