What is a CNAME?
This commit is contained in:
1 parent
6f9f92e68a
commit
e628ec7ecf
2 files changed
+8
-8
No files matched your search
@@ -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