helmet-core - Security Middleware for popular Rust web frameworks
ntex-helmetis a security middleware for thentexweb framework.actix-web-helmetis a security middleware for theactix-webweb framework. Coming Soonrocket-helmetis a security middleware for therocketweb framework. Coming Soonwarp-helmetis a security middleware for thewarpweb framework. Coming Soonaxum-helmetis a security middleware for theaxumweb framework.
It works by setting HTTP headers for you. These headers can help protect your app from some well-known web vulnerabilities:
- Cross-Origin-Embedder-Policy
- Cross-Origin-Opener-Policy
- Cross-Origin-Resource-Policy
- Origin-Agent-Cluster
- Referrer-Policy
- Strict-Transport-Security
- X-Content-Type-Options
- X-DNS-Prefetch-Control
- X-Download-Options
- X-Frame-Options
- X-Permitted-Cross-Domain-Policies
- X-XSS-Protection
- X-Powered-By
- Content-Security-Policy
Usage
Add this to your Cargo.toml:
[]
= "0.1"
Implementing the middleware is different for each framework. See the README for your framework of choice to see how to use it.
Example
use Helmet;
let helmet = default;
;
// Imagine this is a middleware for your favorite framework
License
This project is licensed under the MIT license.