[GH-ISSUE #1245] 重定向后页面显示404 #984

Closed
opened 2026-05-05 12:38:05 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @Heinzyang on GitHub (May 12, 2019).
Original GitHub issue: https://github.com/fatedier/frp/issues/1245

What version of frp are you using (./frpc -v or ./frps -v)?
frp_0.27.0

What operating system and processor architecture are you using (go env)?
ubuntu18.04 amd64

Configures you used:

server:
[common]
bind_port = 7000
vhost_http_port = 80

clinet
[common]
server_addr = xx.xx.xx.xx
server_port = 7000

[http]
type = http
local_port = 8080
custom_domains = www.domain.com

Steps to reproduce the issue:
1.正常访问页面可以映射到本地,如果frps服务器重定向到另一个服务器做OAUTH2认证,并由
另一个服务器重定向到另一服务器(该服务器会通过抓包更改映射,映射到本地服务器),显示404
对应报错
http: proxy error: no such domain: www.xxx.com/xx_war_exploded/rest/xx.html

个人理解:浏览器进行重定向,按理不应该在中间被frps拦截到。

2.一个HTTP请求内轮询某条件,超时后不返回指定数据而是返回404。

对应报错:
http: proxy error: net/http: timeout awaiting response headers

个人理解:是否能设置frps的过期时间?

Describe the results you received:
无法访问该api

Describe the results you expected:
希望能够访问到该api,或者有没有方法,不显示frp的404页面,直接将本地服务器的所有(不论什么)内容都返回到网页上即可。

Additional information you deem important (e.g. issue happens only occasionally):
每次都发生,不是偶然。

Can you point out what caused this issue (optional)

Originally created by @Heinzyang on GitHub (May 12, 2019). Original GitHub issue: https://github.com/fatedier/frp/issues/1245 **What version of frp are you using (./frpc -v or ./frps -v)?** frp_0.27.0 **What operating system and processor architecture are you using (`go env`)?** ubuntu18.04 amd64 **Configures you used:** server: [common] bind_port = 7000 vhost_http_port = 80 clinet [common] server_addr = xx.xx.xx.xx server_port = 7000 [http] type = http local_port = 8080 custom_domains = www.domain.com **Steps to reproduce the issue:** 1.正常访问页面可以映射到本地,如果frps服务器重定向到另一个服务器做OAUTH2认证,并由 另一个服务器重定向到另一服务器(该服务器会通过抓包更改映射,映射到本地服务器),显示404 对应报错 http: proxy error: no such domain: www.xxx.com/xx_war_exploded/rest/xx.html 个人理解:浏览器进行重定向,按理不应该在中间被frps拦截到。 2.一个HTTP请求内轮询某条件,超时后不返回指定数据而是返回404。 对应报错: http: proxy error: net/http: timeout awaiting response headers 个人理解:是否能设置frps的过期时间? **Describe the results you received:** 无法访问该api **Describe the results you expected:** 希望能够访问到该api,或者有没有方法,不显示frp的404页面,直接将本地服务器的所有(不论什么)内容都返回到网页上即可。 **Additional information you deem important (e.g. issue happens only occasionally):** 每次都发生,不是偶然。 **Can you point out what caused this issue (optional)**
Author
Owner

@fatedier commented on GitHub (Jun 4, 2019):

  • 超时通过 vhost_http_timeout 设置。
  • 重定向不清楚你的需求,frps 是一个标准的反向代理,你可以看看是否能在你的应用层面解决问题。
<!-- gh-comment-id:498542205 --> @fatedier commented on GitHub (Jun 4, 2019): * 超时通过 vhost_http_timeout 设置。 * 重定向不清楚你的需求,frps 是一个标准的反向代理,你可以看看是否能在你的应用层面解决问题。
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#984
No description provided.