mirror of
https://github.com/rancher/norman.git
synced 2025-09-19 18:16:15 +00:00
Fix scheme detection in URL
This commit is contained in:
@@ -192,7 +192,11 @@ func parseRequestURL(r *http.Request) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Use incoming url
|
// Use incoming url
|
||||||
return fmt.Sprintf("http://%s%s", r.Host, r.URL.Path)
|
scheme := "http"
|
||||||
|
if r.TLS != nil {
|
||||||
|
scheme = "https"
|
||||||
|
}
|
||||||
|
return fmt.Sprintf("%s://%s%s", scheme, r.Host, r.URL.Path)
|
||||||
}
|
}
|
||||||
|
|
||||||
func getURLFromStandardHeaders(r *http.Request) string {
|
func getURLFromStandardHeaders(r *http.Request) string {
|
||||||
|
Reference in New Issue
Block a user