Browse Source

Use case insensitive comparison when matching vhost

master
Trevor Slocum 2 years ago
parent
commit
f91f42464d
  1. 2
      config.go
  2. 4
      server.go

2
config.go

@ -152,6 +152,8 @@ func readconfig(configPath string) error {
config.fcgiPools = make(map[string]gofast.ConnFactory)
for hostname, host := range config.Hosts {
hostname = strings.ToLower(hostname)
if defaultHost != nil {
if host.Cert == "" {
host.Cert = defaultHost.Cert

4
server.go

@ -389,6 +389,10 @@ func handleConn(c *tls.Conn) {
return
}
if request.Scheme == "gemini" {
request.Host = strings.ToLower(request.Host)
}
status, size, logPath = handleRequest(c, request, requestData)
}

Loading…
Cancel
Save