Browse Source

修改GetDomain

master v0.8.1
gz 7 months ago
parent
commit
1451ae0148
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      header.go

+ 1
- 1
header.go View File

@ -44,7 +44,7 @@ func GetDomain(req *http.Request) string {
var host string = GetHost(req) var host string = GetHost(req)
hosts := strings.Split(host, ":") hosts := strings.Split(host, ":")
host = hosts[0] host = hosts[0]
if hosts[1] == "443" {
if len(hosts) > 1 && hosts[1] == "443" {
scheme = "https://" scheme = "https://"
} }
var w strings.Builder var w strings.Builder


Loading…
Cancel
Save