Remove access token from canonicalLink as per momar

This commit is contained in:
fnetx 2021-11-26 17:03:58 +01:00
parent 772c17e214
commit 455f65216c
No known key found for this signature in database
GPG Key ID: 03870C95EE9F2661
1 changed files with 2 additions and 2 deletions

View File

@ -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()