MCPcopy
hub / github.com/mudler/LocalAI / isSecure

Function isSecure

core/http/auth/session.go:138–140  ·  view source on GitHub ↗

isSecure returns true when the request arrived over HTTPS, either directly or via a reverse proxy that sets X-Forwarded-Proto.

(c echo.Context)

Source from the content-addressed store, hash-verified

136// isSecure returns true when the request arrived over HTTPS, either directly
137// or via a reverse proxy that sets X-Forwarded-Proto.
138func isSecure(c echo.Context) bool {
139 return c.Scheme() == "https"
140}
141
142// SetSessionCookie sets the session cookie on the response.
143func SetSessionCookie(c echo.Context, sessionID string) {

Callers 5

LoginHandlerMethod · 0.85
CallbackHandlerMethod · 0.85
SetSessionCookieFunction · 0.85
SetTokenCookieFunction · 0.85
ClearSessionCookieFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected