[GH-ISSUE #2293] Consider support X-Forwarded-Host and X-Forwarded-Proto? #1822

Closed
opened 2026-05-05 13:10:34 -06:00 by gitea-mirror · 6 comments
Owner

Originally created by @xfan1024 on GitHub (Mar 11, 2021).
Original GitHub issue: https://github.com/fatedier/frp/issues/2293

I setup the Jenkins in private network and expose the http port by frp.

Jenkins told me “It appears that your reverse proxy set up is broken

In order to solve this problem I made a draft, it's works.
I'm not familiar with the Go and I have no idea how to correctly add X-Forwarded-Proto field. Can you provide a solution?

Originally created by @xfan1024 on GitHub (Mar 11, 2021). Original GitHub issue: https://github.com/fatedier/frp/issues/2293 I setup the Jenkins in private network and expose the http port by frp. [Jenkins](https://www.jenkins.io/) told me “[It appears that your reverse proxy set up is broken](https://www.jenkins.io/doc/book/system-administration/reverse-proxy-configuration-troubleshooting)” In order to solve this problem I made a [draft](https://github.com/xfan1024/frp/commit/3e4b61fe6edebbb85f7fd18a724234d74c1f592a), it's works. I'm not familiar with the Go and I have no idea how to correctly add X-Forwarded-Proto field. Can you provide a solution?
Author
Owner

@fatedier commented on GitHub (Mar 12, 2021):

Try this feature https://github.com/fatedier/frp#setting-other-http-headers ?

<!-- gh-comment-id:797218083 --> @fatedier commented on GitHub (Mar 12, 2021): Try this feature https://github.com/fatedier/frp#setting-other-http-headers ?
Author
Owner

@xfan1024 commented on GitHub (Mar 12, 2021):

I had enabled this option, but Jenkins always need X-Forwarded-Host and X-Forwarded-Proto, because Jenkins want know original host and proto from user's browser.

pleause refer to: https://www.jenkins.io/doc/book/system-administration/reverse-proxy-configuration-troubleshooting

<!-- gh-comment-id:797224199 --> @xfan1024 commented on GitHub (Mar 12, 2021): I had enabled this option, but Jenkins always need X-Forwarded-Host and X-Forwarded-Proto, because Jenkins want know original host and proto from user's browser. pleause refer to: https://www.jenkins.io/doc/book/system-administration/reverse-proxy-configuration-troubleshooting
Author
Owner

@fatedier commented on GitHub (Mar 12, 2021):

I think it's ok when you set X-Forwarded-Host the value of custom_domains . It's just the host users should visit.

<!-- gh-comment-id:797300966 --> @fatedier commented on GitHub (Mar 12, 2021): I think it's ok when you set `X-Forwarded-Host ` the value of `custom_domains` . It's just the host users should visit.
Author
Owner

@xfan1024 commented on GitHub (Mar 12, 2021):

Agree, do you have plan ro support it?

<!-- gh-comment-id:797319904 --> @xfan1024 commented on GitHub (Mar 12, 2021): Agree, do you have plan ro support it?
Author
Owner

@fatedier commented on GitHub (Mar 12, 2021):

A sample configure

[test-web]
type = http
local_ip = 127.0.0.1
local_port = 80
custom_domains = web.yourdomain.com
header_X-Forwarded-Host = web.yourdomain.com
header_X-Forwarded-Proto = http
<!-- gh-comment-id:797323160 --> @fatedier commented on GitHub (Mar 12, 2021): A sample configure ```ini [test-web] type = http local_ip = 127.0.0.1 local_port = 80 custom_domains = web.yourdomain.com header_X-Forwarded-Host = web.yourdomain.com header_X-Forwarded-Proto = http ```
Author
Owner

@xfan1024 commented on GitHub (Mar 12, 2021):

Thanks, I got it wrong.😂

<!-- gh-comment-id:797333004 --> @xfan1024 commented on GitHub (Mar 12, 2021): Thanks, I got it wrong.😂
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#1822
No description provided.