remove unused scheme assignment in URL redirection logic
All checks were successful
Build and Push Container Image, Deploy to Host / build-and-push-and-deploy (push) Successful in 36s

This commit is contained in:
2025-07-17 04:00:39 +08:00
parent 49b90f91f2
commit 073f150623

View File

@ -22,7 +22,6 @@ func main() {
newHost := strings.TrimSuffix(host, OldDomain) + NewDomain
scheme := "https"
if proto := c.Request.Header.Get("X-Forwarded-Proto"); len(proto) > 0 {
scheme = string(proto)
} else if forwarded := c.Request.Header.Get("Forwarded"); len(forwarded) > 0 {
// Forwarded: proto=https;host=xxx
for _, part := range strings.Split(string(forwarded), ";") {
@ -40,7 +39,6 @@ func main() {
return
}
})
h.GET("/*any", func(ctx context.Context, c *app.RequestContext) {
c.JSON(200, map[string]interface{}{"message": "pong"})
})