-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
Document use of req.originalUrl
for Reverse Proxy.
#90
Comments
Sure, feel free to pull request the documentation you feel would be appropriate:+1: |
I have a app that sits behind a reverse proxy so that http://server/appname serves data from an express app that is listening on http://localhost:4444/. The following worked (make it the first express route)
Note that if someone decides to change the reverse proxy URL to say http://server/BetterAppName, the directory listing will not longer work unless I don't think this is a good solution - even if the proxy provided the needed header information, the links in a serve-index directory listing could break if the proxy software changes and different headers are used. Given that adding an option to
|
The "x-original-url" is something you must manually setup in your proxy server. There are known solutions for both nginx & apache. As such, the manual header is an acceptable solution. For example.
Now change the proxy location to "/passalong"
Note the only change was the proxy location. Everything else did not change. |
I agree that |
I had the same issue as #53 & #87.
Can we please document the use of
req.originalUrl
in the README?The text was updated successfully, but these errors were encountered: