mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-24 22:06:57 +00:00
move domain file name into const
This commit is contained in:
parent
e73c79da77
commit
314cbdb83c
2 changed files with 3 additions and 1 deletions
|
@ -19,3 +19,5 @@ var fileCacheSizeLimit = 1024 * 1024
|
||||||
|
|
||||||
// canonicalDomainCacheTimeout specifies the timeout for the canonical domain cache.
|
// canonicalDomainCacheTimeout specifies the timeout for the canonical domain cache.
|
||||||
var canonicalDomainCacheTimeout = 15 * time.Minute
|
var canonicalDomainCacheTimeout = 15 * time.Minute
|
||||||
|
|
||||||
|
const canonicalDomainConfig = ".domains"
|
||||||
|
|
|
@ -22,7 +22,7 @@ func CheckCanonicalDomain(targetOwner, targetRepo, targetBranch, actualDomain, m
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
req := fasthttp.AcquireRequest()
|
req := fasthttp.AcquireRequest()
|
||||||
req.SetRequestURI(giteaRoot + "/api/v1/repos/" + targetOwner + "/" + targetRepo + "/raw/" + targetBranch + "/.domains" + "?access_token=" + giteaAPIToken)
|
req.SetRequestURI(giteaRoot + "/api/v1/repos/" + targetOwner + "/" + targetRepo + "/raw/" + targetBranch + canonicalDomainConfig + "?access_token=" + giteaAPIToken)
|
||||||
res := fasthttp.AcquireResponse()
|
res := fasthttp.AcquireResponse()
|
||||||
|
|
||||||
err := client.Do(req, res)
|
err := client.Do(req, res)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue