mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-01-19 00:57:53 +00:00
Fix cached error when .domains is not readable (fixes https://codeberg.org/Codeberg/Community/issues/1512)
Co-authored-by: @algernon
This commit is contained in:
parent
f6d3147ba1
commit
584ba5c74d
1 changed files with 2 additions and 1 deletions
|
@ -33,7 +33,8 @@ func (o *Options) CheckCanonicalDomain(giteaClient *gitea.Client, actualDomain,
|
||||||
body, err := giteaClient.GiteaRawContent(o.TargetOwner, o.TargetRepo, o.TargetBranch, canonicalDomainConfig)
|
body, err := giteaClient.GiteaRawContent(o.TargetOwner, o.TargetRepo, o.TargetBranch, canonicalDomainConfig)
|
||||||
if err != nil && !errors.Is(err, gitea.ErrorNotFound) {
|
if err != nil && !errors.Is(err, gitea.ErrorNotFound) {
|
||||||
log.Error().Err(err).Msgf("could not read %s of %s/%s", canonicalDomainConfig, o.TargetOwner, o.TargetRepo)
|
log.Error().Err(err).Msgf("could not read %s of %s/%s", canonicalDomainConfig, o.TargetOwner, o.TargetRepo)
|
||||||
// TODO: WTF we just continue?! Seems fine as body is empty... :/
|
// Assume that the domain is valid, as Gitea seems to be broken. Don't cache it though.
|
||||||
|
return actualDomain, true
|
||||||
}
|
}
|
||||||
|
|
||||||
var domains []string
|
var domains []string
|
||||||
|
|
Loading…
Reference in a new issue