more upstreamOption usage

This commit is contained in:
6543 2022-11-12 19:00:03 +01:00
parent 7acb60874e
commit 5e499fc12c
No known key found for this signature in database
GPG key ID: C99B82E40B027BAE
4 changed files with 16 additions and 12 deletions

View file

@ -260,7 +260,7 @@ func Handler(mainDomainSuffix, rawDomain string,
TargetBranch: targetBranch,
TargetPath: path.Join(pathParts...),
}, canonicalLink); works {
canonicalDomain, valid := upstream.CheckCanonicalDomain(giteaClient, targetOpt.TargetOwner, targetOpt.TargetRepo, targetOpt.TargetBranch, trimmedHostStr, string(mainDomainSuffix), canonicalDomainCache)
canonicalDomain, valid := targetOpt.CheckCanonicalDomain(giteaClient, trimmedHostStr, string(mainDomainSuffix), canonicalDomainCache)
if !valid {
html.ReturnErrorPage(ctx, "domain not specified in <code>.domains</code> file", http.StatusMisdirectedRequest)
return