mirror of
https://github.com/AlistGo/alist.git
synced 2025-04-21 20:18:47 +08:00
fix: incorrect api if not set site_url (6c2f348)
This commit is contained in:
parent
50579fef84
commit
8655e33e60
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user