(r *http.Request)
| 48 | } |
| 49 | |
| 50 | func 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 | |
| 64 | func IsHttps(c context.Context) bool { |
| 65 | r := GetRequest(c) |
no test coverage detected