revert route handle for 3.3.x

This commit is contained in:
wjqserver 2025-05-20 10:03:48 +08:00
parent 146b0d7748
commit d38ca3969f

10
main.go
View file

@ -468,6 +468,9 @@ func main() {
proxy.RoutingHandler(cfg, limiter, iplimiter)(ctx, c)
})
// for 3.4.0
/*
r.GET("/v2/", func(ctx context.Context, c *app.RequestContext) {
proxy.GhcrRouting(cfg)(ctx, c)
@ -502,12 +505,17 @@ func main() {
fmt.Fprint(w, emptyJSON)
*/
/*
})
r.Any("/v2/:target/*filepath", func(ctx context.Context, c *app.RequestContext) {
proxy.GhcrRouting(cfg)(ctx, c)
})
*/
r.Any("/v2/*filepath", func(ctx context.Context, c *app.RequestContext) {
proxy.GhcrRouting(cfg)(ctx, c)
})
r.NoRoute(func(ctx context.Context, c *app.RequestContext) {
proxy.NoRouteHandler(cfg, limiter, iplimiter)(ctx, c)