diff --git a/agent/utils/nginx/components/server.go b/agent/utils/nginx/components/server.go index 3bd0f1f243c5..eab94b5af8f6 100644 --- a/agent/utils/nginx/components/server.go +++ b/agent/utils/nginx/components/server.go @@ -487,7 +487,7 @@ func (s *Server) AddHTTP2HTTPS(httpsPort int) { } newDir.Block = block - s.UpdateDirectiveBySecondKey("if", " ($scheme", newDir) + s.UpdateDirectiveBySecondKey("if", "($scheme", newDir) } func (s *Server) UpdateAllowIPs(ips []string) {