mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 08:11:11 +08:00
14 lines
307 B
Go
14 lines
307 B
Go
package proxy
|
|
|
|
import (
|
|
"context"
|
|
"ghproxy/config"
|
|
|
|
"github.com/cloudwego/hertz/pkg/app"
|
|
)
|
|
|
|
func GhcrRouting(cfg *config.Config) app.HandlerFunc {
|
|
return func(ctx context.Context, c *app.RequestContext) {
|
|
ChunkedProxyRequest(ctx, c, "https://ghcr.io"+string(c.Request.RequestURI()), cfg, "ghcr")
|
|
}
|
|
}
|