Fix share URL host to always use www.b0esche.cloud instead of r.Host
This commit is contained in:
@@ -2764,10 +2764,7 @@ func getFileShareLinkHandler(w http.ResponseWriter, r *http.Request, db *databas
|
|||||||
} else if r.TLS == nil {
|
} else if r.TLS == nil {
|
||||||
scheme = "http"
|
scheme = "http"
|
||||||
}
|
}
|
||||||
host := r.Host
|
host := "www.b0esche.cloud"
|
||||||
if host == "" {
|
|
||||||
host = "www.b0esche.cloud"
|
|
||||||
}
|
|
||||||
fullURL := fmt.Sprintf("%s://%s/share/%s", scheme, host, link.Token)
|
fullURL := fmt.Sprintf("%s://%s/share/%s", scheme, host, link.Token)
|
||||||
|
|
||||||
w.Header().Set("Content-Type", "application/json")
|
w.Header().Set("Content-Type", "application/json")
|
||||||
@@ -2832,10 +2829,7 @@ func createFileShareLinkHandler(w http.ResponseWriter, r *http.Request, db *data
|
|||||||
} else if r.TLS == nil {
|
} else if r.TLS == nil {
|
||||||
scheme = "http"
|
scheme = "http"
|
||||||
}
|
}
|
||||||
host := r.Host
|
host := "www.b0esche.cloud"
|
||||||
if host == "" {
|
|
||||||
host = "www.b0esche.cloud"
|
|
||||||
}
|
|
||||||
fullURL := fmt.Sprintf("%s://%s/share/%s", scheme, host, link.Token)
|
fullURL := fmt.Sprintf("%s://%s/share/%s", scheme, host, link.Token)
|
||||||
|
|
||||||
w.Header().Set("Content-Type", "application/json")
|
w.Header().Set("Content-Type", "application/json")
|
||||||
@@ -3101,10 +3095,7 @@ func getUserFileShareLinkHandler(w http.ResponseWriter, r *http.Request, db *dat
|
|||||||
} else if r.TLS == nil {
|
} else if r.TLS == nil {
|
||||||
scheme = "http"
|
scheme = "http"
|
||||||
}
|
}
|
||||||
host := r.Host
|
host := "www.b0esche.cloud"
|
||||||
if host == "" {
|
|
||||||
host = "www.b0esche.cloud"
|
|
||||||
}
|
|
||||||
fullURL := fmt.Sprintf("%s://%s/share/%s", scheme, host, link.Token)
|
fullURL := fmt.Sprintf("%s://%s/share/%s", scheme, host, link.Token)
|
||||||
|
|
||||||
w.Header().Set("Content-Type", "application/json")
|
w.Header().Set("Content-Type", "application/json")
|
||||||
@@ -3166,10 +3157,7 @@ func createUserFileShareLinkHandler(w http.ResponseWriter, r *http.Request, db *
|
|||||||
} else if r.TLS == nil {
|
} else if r.TLS == nil {
|
||||||
scheme = "http"
|
scheme = "http"
|
||||||
}
|
}
|
||||||
host := r.Host
|
host := "www.b0esche.cloud"
|
||||||
if host == "" {
|
|
||||||
host = "www.b0esche.cloud"
|
|
||||||
}
|
|
||||||
fullURL := fmt.Sprintf("%s://%s/share/%s", scheme, host, link.Token)
|
fullURL := fmt.Sprintf("%s://%s/share/%s", scheme, host, link.Token)
|
||||||
|
|
||||||
w.Header().Set("Content-Type", "application/json")
|
w.Header().Set("Content-Type", "application/json")
|
||||||
|
|||||||
Reference in New Issue
Block a user