fix status code

This commit is contained in:
wjqserver 2025-03-28 12:05:19 +08:00
parent f342312b40
commit 635c22f9a7
2 changed files with 35 additions and 33 deletions

View file

@ -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)

View file

@ -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 {