MCPcopy Create free account
hub / github.com/ericls/imgdd / IsSecure

Function IsSecure

httpserver/common_middleware.go:50–62  ·  view source on GitHub ↗
(r *http.Request)

Source from the content-addressed store, hash-verified

48}
49
50func IsSecure(r *http.Request) bool {
51 if r == nil {
52 return false
53 }
54 if r.TLS != nil {
55 return true
56 }
57 if r.Header.Get("X-Forwarded-Proto") == "https" {
58 return true
59 }
60
61 return false
62}
63
64func IsHttps(c context.Context) bool {
65 r := GetRequest(c)

Callers 3

makeUploadHandlerFunction · 0.85
IsHttpsFunction · 0.85
GetBaseURLFunction · 0.85

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected