[GH-ISSUE #1979] http header的自定义字段是否支持动态内容呢? #1573

Closed
opened 2026-05-05 12:59:52 -06:00 by gitea-mirror · 6 comments
Owner

Originally created by @hr0109 on GitHub (Sep 11, 2020).
Original GitHub issue: https://github.com/fatedier/frp/issues/1979

比如nginx反向代理,是支持将$host作为自定义header的内容的,请问frp目前是否具有类似的功能呢?

Originally created by @hr0109 on GitHub (Sep 11, 2020). Original GitHub issue: https://github.com/fatedier/frp/issues/1979 比如nginx反向代理,是支持将$host作为自定义header的内容的,请问frp目前是否具有类似的功能呢?
gitea-mirror 2026-05-05 12:59:52 -06:00
Author
Owner

@blizard863 commented on GitHub (Sep 14, 2020):

image

<!-- gh-comment-id:691764227 --> @blizard863 commented on GitHub (Sep 14, 2020): ![image](https://user-images.githubusercontent.com/4812302/93034801-e14cdb00-f66d-11ea-9727-c58a76fd6a0b.png)
Author
Owner

@blizard863 commented on GitHub (Sep 14, 2020):

https://gofrp.org/docs/features/http-https/header/

<!-- gh-comment-id:691764380 --> @blizard863 commented on GitHub (Sep 14, 2020): https://gofrp.org/docs/features/http-https/header/
Author
Owner

@hr0109 commented on GitHub (Sep 14, 2020):

https://gofrp.org/docs/features/http-https/header/

请注意是动态内容
比如我用127.0.0.1访问,这个字段就是127.0.0.1。我用外网ip访问,那这个字段就应该是对应的外网ip。而不是一直不变的frp或者其它什么。
有一些服务器需要根据自定义字段返回资源的绝对url,静态的header内容无法兼容不同来源(内网、外网)的访问请求

<!-- gh-comment-id:691792123 --> @hr0109 commented on GitHub (Sep 14, 2020): > https://gofrp.org/docs/features/http-https/header/ 请注意是**动态**内容 比如我用127.0.0.1访问,这个字段就是127.0.0.1。我用外网ip访问,那这个字段就应该是对应的外网ip。而不是一直不变的frp或者其它什么。 有一些服务器需要根据自定义字段返回资源的绝对url,静态的header内容无法兼容不同来源(内网、外网)的访问请求
Author
Owner

@blizard863 commented on GitHub (Sep 14, 2020):

image

这个勒 ?

<!-- gh-comment-id:691798418 --> @blizard863 commented on GitHub (Sep 14, 2020): ![image](https://user-images.githubusercontent.com/4812302/93042904-e5cfbe80-f682-11ea-84ea-0feabb6e8d78.png) 这个勒 ?
Author
Owner

@fatedier commented on GitHub (Sep 21, 2020):

@hr0109 这是一个相对来说复杂的 HTTP server 的需求,建议在前面挡一层 nginx 来实现此能力。

<!-- gh-comment-id:696127183 --> @fatedier commented on GitHub (Sep 21, 2020): @hr0109 这是一个相对来说复杂的 HTTP server 的需求,建议在前面挡一层 nginx 来实现此能力。
Author
Owner

@github-actions[bot] commented on GitHub (Nov 6, 2020):

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

<!-- gh-comment-id:722734758 --> @github-actions[bot] commented on GitHub (Nov 6, 2020): Issues go stale after 45d of inactivity. Stale issues rot after an additional 10d of inactivity and eventually close.
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#1573
No description provided.