mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #4972] [Feature Request] Custom response for unregistered HTTP vhost (rules, wildcard, headers) #3919
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#3919
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 @mnasruul on GitHub (Sep 8, 2025).
Original GitHub issue: https://github.com/fatedier/frp/issues/4972
Describe the feature request
Summary
Add support for configurable
customResponsein FRPS HTTP vhost, so requests with unknown/unregistered Host header return a user-defined response (status, content-type, body, headers).Why
Currently, FRPS always returns default 404 for unregistered hostnames. This is not customizable. Custom responses improve UX and debugging, especially in multi-tenant setups.
Behavior
*.example.com), and"*"catch-all.Next step
I can prepare a PR with implementation + unit tests if this direction is acceptable.
Describe alternatives you've considered
No response
Affected area
@fatedier commented on GitHub (Sep 15, 2025):
Thanks for the proposal! We’re not expanding L7 HTTP/HTTPS features right now. The current L7 pieces are fragmented and need a redesign. We’ll revisit ideas like this after the L7 refactor. For now, please consider putting a reverse proxy (Nginx/Caddy/Traefik) in front of frps to handle custom fallback pages. Appreciate your understanding!
@mnasruul commented on GitHub (Sep 16, 2025):
As mentioned in the related PR, this proposal is on hold until the L7 HTTP/HTTPS refactor.
If anyone needs this feature earlier, I’ve published my fork with a working implementation here:
👉 https://github.com/mnasruul/frp
The fork adds a [customResponse] block in frps.toml that allows returning custom status, content type, body, and headers when a Host is not registered by any FRPC.
Once the L7 redesign is ready, I’d be glad to help contribute this feature upstream again.
Thanks @fatedier