mirror of
https://code.rocketnine.space/tslocum/twins.git
synced 2024-11-27 13:28:15 +01:00
Use case insensitive comparison when matching vhost
This commit is contained in:
parent
c64a59c44e
commit
f91f42464d
2 changed files with 6 additions and 0 deletions
|
@ -152,6 +152,8 @@ func readconfig(configPath string) error {
|
||||||
|
|
||||||
config.fcgiPools = make(map[string]gofast.ConnFactory)
|
config.fcgiPools = make(map[string]gofast.ConnFactory)
|
||||||
for hostname, host := range config.Hosts {
|
for hostname, host := range config.Hosts {
|
||||||
|
hostname = strings.ToLower(hostname)
|
||||||
|
|
||||||
if defaultHost != nil {
|
if defaultHost != nil {
|
||||||
if host.Cert == "" {
|
if host.Cert == "" {
|
||||||
host.Cert = defaultHost.Cert
|
host.Cert = defaultHost.Cert
|
||||||
|
|
|
@ -389,6 +389,10 @@ func handleConn(c *tls.Conn) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if request.Scheme == "gemini" {
|
||||||
|
request.Host = strings.ToLower(request.Host)
|
||||||
|
}
|
||||||
|
|
||||||
status, size, logPath = handleRequest(c, request, requestData)
|
status, size, logPath = handleRequest(c, request, requestData)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue