mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #4981] [Feature Request] add ability to strip prefix for http type proxy #3926
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#3926
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cayspekko on GitHub (Sep 15, 2025).
Original GitHub issue: https://github.com/fatedier/frp/issues/4981
Describe the feature request
Please add prefix stripping to frp http proxy type (similar to static_file)
I typically use frp http proxy similar to
then I navigate to
frp.example.com/r/fast to get to my proxied page. However, this requirers my target application to be aware that the incoming http path is /r/fast, which can be inconvenient.
I've added the ability to "strip prefix" for any locations defined. This is useful if the target can't be aware of paths and expects paths at /
obviously there are tonsof other ways get around this outside of frp, but usually involves adding another reverse proxy in the chain. I find it convenient for my usecase to have the prefix stripping ability built into frp.
I'm using this config instead:
this specifically will strip any locations defined in locations
The strip logic is implemented in http.go in the same block that we rewrite the host when requested.
Describe alternatives you've considered
No response
Affected area
@fatedier commented on GitHub (Sep 16, 2025):
Right now, frp isn’t a fully featured L7 proxy.
We don’t plan to add such features one by one for the time being. You can prioritize using it together with other proxies.
@cayspekko commented on GitHub (Sep 16, 2025):
Very well, I will fork this project, implementing this functionality, and until such time it makes sense to add similar prefix stripping like in the static file plugin, I will open a PR.
@github-actions[bot] commented on GitHub (Oct 1, 2025):
Issues go stale after 14d of inactivity. Stale issues rot after an additional 3d of inactivity and eventually close.
@CuWoMayr commented on GitHub (Mar 27, 2026):
@cayspekko I saw your fork and tried it using your built Docker Container. It worked flawlessly.
Do you still intend to open a Pull Request?
@cayspekko commented on GitHub (Apr 3, 2026):
@CuWoMayr I will try to open a Pull Request and see if it gets accepted
here: https://github.com/fatedier/frp/pull/5276