-
Notifications
You must be signed in to change notification settings - Fork 505
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
PathPrefix
and Full Path
support rewriteTarget
#552
Comments
PathPrefix
and Full Path
support rewriteTargetPathPrefix
and Full Path
support rewriteTarget
Thanks for opening the issue! When I run this on my workstation, I get following output prefixPath: 1.969323ms
regexPath: 18.592825ms so running But of course, every performance improvement is a positive thing. If this change don't add extra complexity, maybe it's worth it. |
|
Is your feature request related to a problem? Please describe.
Currently only "pathRegexp" supports rewriteTarget, in some scenarios, it would be better for path and pathPrefix to support rewriteTarget
https://github.com/megaease/easegress/blob/0cd6b15620601de3021abbca1e310120a566795d/pkg/object/httpserver/mux.go#L508-L513
Describe the solution you'd like
Due to some historical reasons, the API design is not standardized. At present, when accessing easegress, it is necessary to develop a new standard API interface, rewrite the old API into a new API, and then forward it through proxy.
During use, it was found that only pathRegexp supports rewriteTarget. In most of our scenarios, using prefix can basically solve most problems, a small amount can be solved using full path, and pathRegexp is basically not used, although prefix can solve the problem, Regexp can also be solved, but in terms of program execution efficiency, prefix performance will be higher, so I think, we need to support the path rewriting of prefix and full path
eg:
Additional context
If you agree with the change, I will follow up with the corresponding PR
Thanks for contributing 🎉!
The text was updated successfully, but these errors were encountered: