What is a CNAME?
This commit is contained in:
@@ -26,8 +26,10 @@ import (
|
||||
func handleSubdomain(domain, cname, path, giteaUrl, defaultCsp string, giteaClient *repo.GiteaClient, w http.ResponseWriter) {
|
||||
username := ""
|
||||
if cname != "" {
|
||||
// If we are accessed via a CNAME, then CNAME contains our <user>.<pages domain> value.
|
||||
username = strings.Split(cname, ".")[0]
|
||||
} else {
|
||||
// If we are directly accessed, then domain contains our <user>.<pages domain> value.
|
||||
username = strings.Split(domain, ".")[0]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user