mirror of
https://github.com/seriousm4x/UpSnap.git
synced 2026-03-31 06:24:09 -04:00
feat: support X-Forwarded-Proto for manifest URL (#1395)
This commit is contained in:
@@ -386,7 +386,7 @@ func asyncCall(e *core.RequestEvent, fn func() *router.ApiError) *router.ApiErro
|
|||||||
|
|
||||||
func HandlerWebsiteManifest(e *core.RequestEvent) error {
|
func HandlerWebsiteManifest(e *core.RequestEvent) error {
|
||||||
scheme := "http"
|
scheme := "http"
|
||||||
if e.Request.TLS != nil {
|
if e.Request.TLS != nil || e.Request.Header.Get("X-Forwarded-Proto") == "https" {
|
||||||
scheme = "https"
|
scheme = "https"
|
||||||
}
|
}
|
||||||
baseUrl := fmt.Sprintf("%s://%s", scheme, e.Request.Host)
|
baseUrl := fmt.Sprintf("%s://%s", scheme, e.Request.Host)
|
||||||
|
|||||||
Reference in New Issue
Block a user