suggestions from review

This commit is contained in:
crapStone 2023-11-17 23:17:12 +01:00
parent 4d760d9a9d
commit 6e797b8115
No known key found for this signature in database
GPG key ID: D74B82E7CDD863FE
8 changed files with 66 additions and 29 deletions

View file

@ -96,7 +96,7 @@ func Handler(
log.Debug().Msg("subdomain request detected")
handleSubDomain(log, ctx, giteaClient,
cfg.MainDomain,
cfg.DefaultBranches,
cfg.PagesBranches,
trimmedHost,
pathElements,
canonicalDomainCache, redirectsCache)
@ -106,7 +106,7 @@ func Handler(
cfg.MainDomain,
trimmedHost,
pathElements,
cfg.DefaultBranches[0],
cfg.PagesBranches[0],
dnsLookupCache, canonicalDomainCache, redirectsCache)
}
}

View file

@ -27,7 +27,7 @@ func TestHandlerPerformance(t *testing.T) {
"/.well-known/acme-challenge/",
},
AllowedCorsDomains: []string{"raw.codeberg.org", "fonts.codeberg.org", "design.codeberg.org"},
DefaultBranches: []string{"pages"},
PagesBranches: []string{"pages"},
}
testHandler := Handler(serverCfg, giteaClient, cache.NewInMemoryCache(), cache.NewInMemoryCache(), cache.NewInMemoryCache())