8000 Merge pull request #426 from alexandre-daubois/fix-server-name · symfony-cli/symfony-cli@c02c834 · GitHub
[go: up one dir, main page]

Skip to content

Commit c02c834

Browse files
authored
Merge pull request #426 from alexandre-daubois/fix-server-name
Remove port from `$_SERVER['SERVER_NAME']`
2 parents dbe6914 + 425e365 commit c02c834

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

local/http/http.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ func (s *Server) Handler(w http.ResponseWriter, r *http.Request) {
232232
}
233233
env := map[string]string{
234234
"SERVER_PORT": s.serverPort,
235-
"SERVER_NAME": r.Host,
235+
"SERVER_NAME": strings.Split(r.Host, ":")[0],
236236
"SERVER_PROTOCOL": r.Proto,
237237
"SERVER_SOFTWARE": fmt.Sprintf("symfony-cli/%s", s.Appversion),
238238
}

0 commit comments

Comments
 (0)
0