-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Proxy path option #439
base: master
Are you sure you want to change the base?
Proxy path option #439
Conversation
Hey, I guess this will still need some work. It works perfectly fine when testing locally, but on my AWS deployment it somehow breaks. |
Actually I guess it works, issue is probably just with my AWS setup :) |
Thanks for coding this idea! First, some minor house keeping:
Second, we'd need to address some of the confusion around the semantics of the command and the likely request for doing this with multiple paths. URL rewriting has come up before and #377 explores a "config-based" approach. However, keeping Consequently, things could get confusing when folks try to figure out how to use this feature. For instance:
Currently, the There are bound to be other servers out there who handle a "path + URL" mapping from the command line. Perhaps picking up some of their tips and trips may help here. |
Excellent points! You are absolutely right that there should be a way to include multiple paths, and I don't think there is a good way to do it with the command line switches. My gut feeling is that an optional config would be the way to go if you decide to add this feature in. Anyways, thanks for responding and I hope my PR raises some discussion! |
https://github.com/txchen/light-server has a similar kind of implementation as the one I did ( It also has a optional config file, which might be a good way to implement the configuration (e.g. for various proxypaths) which was mentioned above. |
This pull request has been inactive for 360 days |
This was almost working, except
|
I personally find the idea of a more complex configuration file good. There is also a good approach with #906 with the specified example. |
Add new "proxy path"
-R
option, which you can use to specify a certain path for which the requests are proxied. Other paths are not proxied.Example:
If I want to proxy only requests done to path
/api/
, I can set-R /api/
. Then:GET /a.html -> not proxied
GET /api/data -> proxied
Solves issue: #280