mirror of https://github.com/Xhofe/alist
fix: incorrect api if not set site_url (6c2f348
)
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…
Reference in New Issue