This commit is contained in:
parent
412e5d2fac
commit
996aa10866
@ -68,7 +68,7 @@ func Handler(pagesDomain, giteaUrl, defaultCsp string, giteaClient *repo.GiteaCl
|
|||||||
|
|
||||||
if strings.HasSuffix(cname, pagesDomain) {
|
if strings.HasSuffix(cname, pagesDomain) {
|
||||||
log.Debugf("%s is alias of %s and can be handled after a CNAME query", req.Host, cname)
|
log.Debugf("%s is alias of %s and can be handled after a CNAME query", req.Host, cname)
|
||||||
handleSubdomain(cname, cname, req.URL.Path, giteaUrl, defaultCsp, giteaClient, w)
|
handleSubdomain(req.Host, cname, req.URL.Path, giteaUrl, defaultCsp, giteaClient, w)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ func lookupRepositoryAndCache(username, reponame, branchName, host, domain, path
|
|||||||
|
|
||||||
log.Debugf("CNAME Content: %s", cnameContent)
|
log.Debugf("CNAME Content: %s", cnameContent)
|
||||||
if cnameContent != cname {
|
if cnameContent != cname {
|
||||||
log.Warnf("CNAME mismatch: Got '%s', expected '%s'", cname, cnameContent)
|
log.Warnf("CNAME mismatch: Repo '%s', CNAME '%s'", cnameContent, cname)
|
||||||
return nil, errors.New("CNAME mismatch")
|
return nil, errors.New("CNAME mismatch")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user