mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-25 06:16:58 +00:00
code format
This commit is contained in:
parent
70c7065f76
commit
6af6523a0f
2 changed files with 6 additions and 6 deletions
|
@ -29,7 +29,7 @@ func tryUpstream(ctx *fasthttp.RequestCtx,
|
|||
if targetRepo != "pages" {
|
||||
path := strings.SplitN(canonicalPath, "/", 3)
|
||||
if len(path) >= 3 {
|
||||
canonicalPath = "/" + strings.SplitN(canonicalPath, "/", 3)[2]
|
||||
canonicalPath = "/" + path[2]
|
||||
}
|
||||
}
|
||||
ctx.Redirect("https://"+canonicalDomain+canonicalPath, fasthttp.StatusTemporaryRedirect)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue