diff --git a/agent/utils/nginx/components/server.go b/agent/utils/nginx/components/server.go index eab94b5af8f6..84fe0b046df3 100644 --- a/agent/utils/nginx/components/server.go +++ b/agent/utils/nginx/components/server.go @@ -482,7 +482,7 @@ func (s *Server) AddHTTP2HTTPS(httpsPort int) { } else { block.AppendDirectives(&Directive{ Name: "return", - Parameters: []string{"301", fmt.Sprintf("https://$host$request_uri:%d", httpsPort)}, + Parameters: []string{"301", fmt.Sprintf("https://$host:%d$request_uri", httpsPort)}, }) }