mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-01-18 16:47:54 +00:00
Remove access token from canonicalLink as per momar
This commit is contained in:
parent
772c17e214
commit
455f65216c
1 changed files with 2 additions and 2 deletions
|
@ -152,7 +152,7 @@ func handler(ctx *fasthttp.RequestCtx) {
|
|||
if len(pathElements) > 2 && strings.HasPrefix(pathElements[2], "@") {
|
||||
s.Step("raw domain preparations, now trying with specified branch")
|
||||
if tryBranch(targetRepo, pathElements[2][1:], pathElements[3:],
|
||||
string(GiteaRoot)+"/"+targetOwner+"/"+targetRepo+"/src/branch/%b/%p"+"?access_token="+string(GiteaApiToken),
|
||||
string(GiteaRoot)+"/"+targetOwner+"/"+targetRepo+"/src/branch/%b/%p",
|
||||
) {
|
||||
s.Step("tryBranch, now trying upstream")
|
||||
tryUpstream()
|
||||
|
@ -164,7 +164,7 @@ func handler(ctx *fasthttp.RequestCtx) {
|
|||
} else {
|
||||
s.Step("raw domain preparations, now trying with default branch")
|
||||
tryBranch(targetRepo, "", pathElements[2:],
|
||||
string(GiteaRoot)+"/"+targetOwner+"/"+targetRepo+"/src/branch/%b/%p"+"?access_token="+string(GiteaApiToken),
|
||||
string(GiteaRoot)+"/"+targetOwner+"/"+targetRepo+"/src/branch/%b/%p",
|
||||
)
|
||||
s.Step("tryBranch, now trying upstream")
|
||||
tryUpstream()
|
||||
|
|
Loading…
Reference in a new issue