From 8655e33e60bc4d71874dea480d74d7369df5ea05 Mon Sep 17 00:00:00 2001 From: Andy Hsu Date: Tue, 21 Feb 2023 19:57:50 +0800 Subject: [PATCH] fix: incorrect api if not set site_url (6c2f348) --- server/common/base.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/common/base.go b/server/common/base.go index 9faea201..d2e49a2f 100644 --- a/server/common/base.go +++ b/server/common/base.go @@ -14,7 +14,7 @@ func GetApiUrl(r *http.Request) string { if strings.HasPrefix(api, "http") { return api } - if r != nil && api == "" { + if r != nil { protocol := "http" if r.TLS != nil || r.Header.Get("X-Forwarded-Proto") == "https" { protocol = "https"