mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 00:01:10 +08:00
fix status code
This commit is contained in:
parent
f342312b40
commit
635c22f9a7
2 changed files with 35 additions and 33 deletions
2
main.go
2
main.go
|
|
@ -361,6 +361,7 @@ func main() {
|
|||
|
||||
setupPages(cfg, r)
|
||||
|
||||
/*
|
||||
// 1. GitHub Releases/Archive - Use distinct path segments for type
|
||||
r.GET("/github.com/:username/:repo/releases/*filepath", func(ctx context.Context, c *app.RequestContext) { // Distinct path for releases
|
||||
proxy.NoRouteHandler(cfg, limiter, iplimiter)(ctx, c)
|
||||
|
|
@ -400,6 +401,7 @@ func main() {
|
|||
r.GET("/api.github.com/repos/:username/:repo/*filepath", func(ctx context.Context, c *app.RequestContext) {
|
||||
proxy.NoRouteHandler(cfg, limiter, iplimiter)(ctx, c)
|
||||
})
|
||||
*/
|
||||
|
||||
r.NoRoute(func(ctx context.Context, c *app.RequestContext) {
|
||||
proxy.NoRouteHandler(cfg, limiter, iplimiter)(ctx, c)
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ func ChunkedProxyRequest(ctx context.Context, c *app.RequestContext, u string, c
|
|||
c.Header("Access-Control-Allow-Origin", cfg.Server.Cors)
|
||||
}
|
||||
|
||||
//c.Status(resp.StatusCode)
|
||||
c.Status(resp.StatusCode)
|
||||
//c.Response.HijackWriter(hresp.NewChunkedBodyWriter(&c.Response, c.GetWriter()))
|
||||
|
||||
if MatcherShell(u) && matchString(matcher, matchedMatchers) && cfg.Shell.Editor {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue