MCPcopy
hub / github.com/labstack/echo / Secure

Function Secure

middleware/secure.go:91–93  ·  view source on GitHub ↗

Secure returns a Secure middleware. Secure middleware provides protection against cross-site scripting (XSS) attack, content type sniffing, clickjacking, insecure connection and other code injection attacks.

()

Source from the content-addressed store, hash-verified

89// content type sniffing, clickjacking, insecure connection and other code injection
90// attacks.
91func Secure() echo.MiddlewareFunc {
92 return SecureWithConfig(DefaultSecureConfig)
93}
94
95// SecureWithConfig returns a Secure middleware with config or panics on invalid configuration.
96func SecureWithConfig(config SecureConfig) echo.MiddlewareFunc {

Callers 1

TestSecureFunction · 0.85

Calls 1

SecureWithConfigFunction · 0.85

Tested by 1

TestSecureFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…