[GH-ISSUE #4404] [Feature Request] Support for URI Stripping in HTTP Proxies #3479

Closed
opened 2026-05-05 14:14:10 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @xjetry on GitHub (Aug 24, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/4404

Describe the feature request

I am currently using Nginx to forward traffic from ports 80 and 443 to port 8000 and have configured vhostHTTPPort=8000. My client configuration is as follows:

[[proxies]]
name = "service-1"
type = "http"
localPort = 8081
customDomains = ["www.example.com"]
locations = ["/service-1"]

When I make a request to www.example.com/service-1/foo, the service on port 8081 receives the request URI as /service-1/foo instead of the expected /foo. I have reviewed the documentation but have not found a way to configure this behavior.

Is there an existing feature that supports stripping the location prefix from the URI before forwarding the request to the local service? If not, could this feature be considered for future development?

Thank you for your attention to this request.

Describe alternatives you've considered

No response

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @xjetry on GitHub (Aug 24, 2024). Original GitHub issue: https://github.com/fatedier/frp/issues/4404 ### Describe the feature request I am currently using Nginx to forward traffic from ports 80 and 443 to port 8000 and have configured vhostHTTPPort=8000. My client configuration is as follows: ```toml [[proxies]] name = "service-1" type = "http" localPort = 8081 customDomains = ["www.example.com"] locations = ["/service-1"] ``` When I make a request to www.example.com/service-1/foo, the service on port 8081 receives the request URI as /service-1/foo instead of the expected /foo. I have reviewed the documentation but have not found a way to configure this behavior. Is there an existing feature that supports stripping the location prefix from the URI before forwarding the request to the local service? If not, could this feature be considered for future development? Thank you for your attention to this request. ### Describe alternatives you've considered _No response_ ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [X] Developer Infrastructure - [X] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
Author
Owner

@xqzr commented on GitHub (Aug 25, 2024):

尝试 /service-1 > /service-1/

<!-- gh-comment-id:2308943367 --> @xqzr commented on GitHub (Aug 25, 2024): 尝试 `/service-1` > `/service-1/`
Author
Owner

@fatedier commented on GitHub (Aug 26, 2024):

We currently do not support various Layer 7 proxy capabilities; you need to use it in conjunction with proxies like nginx.

<!-- gh-comment-id:2309193864 --> @fatedier commented on GitHub (Aug 26, 2024): We currently do not support various Layer 7 proxy capabilities; you need to use it in conjunction with proxies like nginx.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#3479
No description provided.