MCPcopy Index your code
hub / github.com/PatchMon/PatchMon / isSecureRequest

Function isSecureRequest

server-source-code/internal/handler/auth.go:756–758  ·  view source on GitHub ↗

isSecureRequest returns true if the request is over HTTPS (TLS or X-Forwarded-Proto).

(r *http.Request)

Source from the content-addressed store, hash-verified

754
755// isSecureRequest returns true if the request is over HTTPS (TLS or X-Forwarded-Proto).
756func isSecureRequest(r *http.Request) bool {
757 return r.TLS != nil || r.Header.Get("X-Forwarded-Proto") == "https"
758}
759
760// clearAuthCookies removes auth cookies (matches Node backend).
761// Secure must match the original cookie for the browser to clear it.

Callers 6

CallbackMethod · 0.85
LogoutMethod · 0.85
setDeviceTrustCookieMethod · 0.85
clearDeviceTrustCookieFunction · 0.85
clearAuthCookiesFunction · 0.85
CallbackMethod · 0.85

Calls 1

GetMethod · 0.45

Tested by

no test coverage detected