[GH-ISSUE #3111] [Feature Request] URL rewrite functionality? #2494

Closed
opened 2026-05-05 13:36:22 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @shouldsee on GitHub (Sep 28, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/3111

Describe the feature request

Wants to rewrite a the url in a proxied HTTP request, as one would do in nginx. This is useful when mounting application to a url_prefix. I am not very familiar with HTTP but at the very basic the url needs to be recovered to remove the /${base_url} in the proxyed url?

Describe alternatives you've considered

nginx way to mount supervisor interface at 8999. as from https://github.com/Supervisor/supervisor/issues/29

location /supervisor {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    # hack the host https://github.com/Supervisor/supervisor/issues/251
    proxy_set_header Host $http_host/supervisor/index.html;
    proxy_redirect off;
    rewrite ^/supervisor(.*)$ /$1 break;
    proxy_pass http://127.0.0.1:8999/;
}

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @shouldsee on GitHub (Sep 28, 2022). Original GitHub issue: https://github.com/fatedier/frp/issues/3111 ### Describe the feature request Wants to rewrite a the url in a proxied HTTP request, as one would do in nginx. This is useful when mounting application to a url_prefix. I am not very familiar with HTTP but at the very basic the url needs to be recovered to remove the /${base_url} in the proxyed url? ### Describe alternatives you've considered nginx way to mount supervisor interface at 8999. as from https://github.com/Supervisor/supervisor/issues/29 ``` location /supervisor { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # hack the host https://github.com/Supervisor/supervisor/issues/251 proxy_set_header Host $http_host/supervisor/index.html; proxy_redirect off; rewrite ^/supervisor(.*)$ /$1 break; proxy_pass http://127.0.0.1:8999/; } ``` ### Affected area - [X] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [X] User Experience - [X] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [X] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:36:22 -06:00
Author
Owner

@fatedier commented on GitHub (Sep 29, 2022):

It can be supported in frp v2 future.

<!-- gh-comment-id:1261698516 --> @fatedier commented on GitHub (Sep 29, 2022): It can be supported in frp v2 future.
Author
Owner

@github-actions[bot] commented on GitHub (Oct 30, 2022):

Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

<!-- gh-comment-id:1296039701 --> @github-actions[bot] commented on GitHub (Oct 30, 2022): Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
Author
Owner

@SKJoy commented on GitHub (Jun 23, 2025):

Following worked for me well with;

Supervisor

...
[inet_http_server]
port=127.0.0.1:9001
...

NginX

...
location /supervisor/ {
	proxy_set_header Host $http_host/supervisor/;
	proxy_pass http://127.0.0.1:9001/;
}
...

URL: https://host.gtld/supervisor/

<!-- gh-comment-id:2996525130 --> @SKJoy commented on GitHub (Jun 23, 2025): Following worked for me well with; ## Supervisor ``` ... [inet_http_server] port=127.0.0.1:9001 ... ``` ## NginX ``` ... location /supervisor/ { proxy_set_header Host $http_host/supervisor/; proxy_pass http://127.0.0.1:9001/; } ... ``` URL: `https://host.gtld/supervisor/`
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#2494
No description provided.