Compare commits

...

8 Commits

Author SHA1 Message Date
unknown
eec8007e72 fix return code 2026-02-04 11:28:02 +03:00
3216858346 Обновить pkg/util/vhost/resource.go 2026-02-04 08:33:33 +03:00
unknown
69d8d28915 Patch: error 502 2026-02-04 08:08:45 +03:00
fatedier
5f575b8442
Merge pull request #5147 from fatedier/dev
bump version
2026-01-31 14:01:40 +08:00
fatedier
a1348cdf00
bump version (#5112) 2026-01-04 14:54:13 +08:00
fatedier
2f5e1f7945
Merge pull request #4999 from fatedier/dev
bump version
2025-09-25 20:23:42 +08:00
fatedier
22ae8166d3
Merge pull request #4925 from fatedier/dev
bump version
2025-08-10 23:26:32 +08:00
fatedier
af6bc6369d
Merge pull request #4849 from fatedier/dev
bump version
2025-06-25 11:51:19 +08:00
2 changed files with 12 additions and 18 deletions

View File

@ -136,7 +136,7 @@ func NewHTTPReverseProxy(option HTTPReverseProxyOptions, vhostRouter *Routers) *
return
}
}
rw.WriteHeader(http.StatusNotFound)
rw.WriteHeader(http.StatusBadGateway)
_, _ = rw.Write(getNotFoundPageContent())
},
}

View File

@ -29,24 +29,18 @@ var NotFoundPagePath = ""
const (
NotFound = `<!DOCTYPE html>
<html>
<head>
<title>Not Found</title>
<style>
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
</head>
<head><title>502 Bad Gateway</title></head>
<body>
<h1>The page you requested was not found.</h1>
<p>Sorry, the page you are looking for is currently unavailable.<br/>
Please try again later.</p>
<p>The server is powered by <a href="https://github.com/fatedier/frp">frp</a>.</p>
<p><em>Faithfully yours, frp.</em></p>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>apache</center>
</body>
</html>
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
`
)
@ -74,8 +68,8 @@ func NotFoundResponse() *http.Response {
content := getNotFoundPageContent()
res := &http.Response{
Status: "Not Found",
StatusCode: 404,
Status: "Bad Gateway",
StatusCode: 502,
Proto: "HTTP/1.1",
ProtoMajor: 1,
ProtoMinor: 1,