Remove access token from canonicalLink as per momar

pull/9/head
fnetx 2021-11-26 17:03:58 +01:00
rodzic 772c17e214
commit 455f65216c
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 03870C95EE9F2661
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

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