mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-25 06:16:58 +00:00
Remove REDIRECT_BROKEN_DNS page and instead use "Failed Dependency" error
This commit is contained in:
parent
6c85b8a166
commit
fedfa8def4
3 changed files with 2 additions and 6 deletions
|
@ -242,7 +242,7 @@ func handler(ctx *fasthttp.RequestCtx) {
|
|||
// Serve pages from external domains
|
||||
targetOwner, targetRepo, targetBranch = getTargetFromDNS(trimmedHostStr)
|
||||
if targetOwner == "" {
|
||||
ctx.Redirect(BrokenDNSPage, fasthttp.StatusTemporaryRedirect)
|
||||
returnErrorPage(ctx, fasthttp.StatusFailedDependency)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -268,7 +268,7 @@ func handler(ctx *fasthttp.RequestCtx) {
|
|||
ctx.Redirect("https://"+canonicalDomain+string(ctx.RequestURI()), fasthttp.StatusTemporaryRedirect)
|
||||
return
|
||||
} else {
|
||||
ctx.Redirect(BrokenDNSPage, fasthttp.StatusTemporaryRedirect)
|
||||
returnErrorPage(ctx, fasthttp.StatusFailedDependency)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue