| Crates.io | actix-web-helmet |
| lib.rs | actix-web-helmet |
| version | 0.2.0 |
| created_at | 2025-04-02 15:44:21.788331+00 |
| updated_at | 2025-04-02 15:44:21.788331+00 |
| description | HTTP security headers middleware for actix-web |
| homepage | https://github.com/danielkov/rust-helmet |
| repository | https://github.com/danielkov/rust-helmet |
| max_upload_size | |
| id | 1616742 |
| size | 53,804 |
actix-web-helmet - Security Middleware for ntex web frameworkactix-web-helmet is a security middleware for the actix-web web framework. It's based on the helmet middleware for Node.js.
It works by setting HTTP headers for you. These headers can help protect your app from some well-known web vulnerabilities:
Add this to your Cargo.toml:
[dependencies]
actix-web-helmet = "0.1"
use actix_web::{web, App, HttpResponse};
use actix_web_helmet::Helmet;
#[actix_web::main]
async fn main() {
let app = App::new()
.wrap(Helmet::default())
.service(web::resource("/").to(|| HttpResponse::Ok()));
// ...
}
This project is licensed under the MIT license.