mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-05-12 16:17:12 +02:00
start refactor Upstream func
This commit is contained in:
parent
de4706bf58
commit
e6198e4ddd
3 changed files with 7 additions and 8 deletions
|
@ -24,7 +24,7 @@ func CheckCanonicalDomain(targetOwner, targetRepo, targetBranch, actualDomain, m
|
|||
req.SetRequestURI(giteaRoot + "/api/v1/repos/" + targetOwner + "/" + targetRepo + "/raw/" + targetBranch + "/.domains" + "?access_token=" + giteaApiToken)
|
||||
res := fasthttp.AcquireResponse()
|
||||
|
||||
err := Client.Do(req, res)
|
||||
err := client.Do(req, res)
|
||||
if err == nil && res.StatusCode() == fasthttp.StatusOK {
|
||||
for _, domain := range strings.Split(string(res.Body()), "\n") {
|
||||
domain = strings.ToLower(domain)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue