fix: request scheme on vercel

This commit is contained in:
Gustavo "Guz" L. de Mello
2024-06-11 16:37:42 -03:00
parent 2a1c79ffdc
commit b89909ec81

View File

@@ -60,7 +60,11 @@ func Image(w http.ResponseWriter, r *http.Request) {
}
if u.Hostname() == "" {
if r.URL.Scheme == "" {
u.Scheme = "https"
} else {
u.Scheme = r.URL.Scheme
}
u.Host = r.Host
}
}