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.
()
| 89 | // content type sniffing, clickjacking, insecure connection and other code injection |
| 90 | // attacks. |
| 91 | func Secure() echo.MiddlewareFunc { |
| 92 | return SecureWithConfig(DefaultSecureConfig) |
| 93 | } |
| 94 | |
| 95 | // SecureWithConfig returns a Secure middleware with config or panics on invalid configuration. |
| 96 | func SecureWithConfig(config SecureConfig) echo.MiddlewareFunc { |
searching dependent graphs…