mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2024-11-18 10:29:43 +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], "@") {
|
if len(pathElements) > 2 && strings.HasPrefix(pathElements[2], "@") {
|
||||||
s.Step("raw domain preparations, now trying with specified branch")
|
s.Step("raw domain preparations, now trying with specified branch")
|
||||||
if tryBranch(targetRepo, pathElements[2][1:], pathElements[3:],
|
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")
|
s.Step("tryBranch, now trying upstream")
|
||||||
tryUpstream()
|
tryUpstream()
|
||||||
|
@ -164,7 +164,7 @@ func handler(ctx *fasthttp.RequestCtx) {
|
||||||
} else {
|
} else {
|
||||||
s.Step("raw domain preparations, now trying with default branch")
|
s.Step("raw domain preparations, now trying with default branch")
|
||||||
tryBranch(targetRepo, "", pathElements[2:],
|
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")
|
s.Step("tryBranch, now trying upstream")
|
||||||
tryUpstream()
|
tryUpstream()
|
||||||
|
|
Loading…
Reference in a new issue