Merge branch 'main' into issue115

This commit is contained in:
6543 2022-11-11 15:03:01 +01:00
commit 06bde50161
6 changed files with 21 additions and 12 deletions

View file

@ -86,7 +86,7 @@ func Handler(mainDomainSuffix, rawDomain []byte,
// also disallow search indexing and add a Link header to the canonical URL.
tryBranch := func(log zerolog.Logger, repo, branch string, path []string, canonicalLink string) bool {
if repo == "" {
log.Debug().Msg("tryBranch: repo is empty")
log.Warn().Msg("tryBranch: repo is empty")
return false
}
@ -97,7 +97,7 @@ func Handler(mainDomainSuffix, rawDomain []byte,
// Check if the branch exists, otherwise treat it as a file path
branchTimestampResult := upstream.GetBranchTimestamp(giteaClient, targetOwner, repo, branch, branchTimestampCache)
if branchTimestampResult == nil {
log.Debug().Msg("tryBranch: branch doesn't exist")
log.Warn().Msg("tryBranch: branch doesn't exist")
return false
}
@ -299,7 +299,7 @@ func Handler(mainDomainSuffix, rawDomain []byte,
return
}
log.Info().Msg("tryBranch, now trying upstream 7 %s")
log.Info().Msg("tryBranch, now trying upstream 7")
tryUpstream(ctx, giteaClient, mainDomainSuffix, trimmedHost,
targetOptions, targetOwner, targetRepo, targetBranch, targetPath,
canonicalDomainCache, branchTimestampCache, fileResponseCache)