actix-web-helmet

Crates.ioactix-web-helmet
lib.rsactix-web-helmet
version0.2.0
created_at2025-04-02 15:44:21.788331+00
updated_at2025-04-02 15:44:21.788331+00
descriptionHTTP security headers middleware for actix-web
homepagehttps://github.com/danielkov/rust-helmet
repositoryhttps://github.com/danielkov/rust-helmet
max_upload_size
id1616742
size53,804
Daniel Emod Kovacs (danielkov)

documentation

README

actix-web-helmet - Security Middleware for ntex web framework

crate docs

actix-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:

Usage

Add this to your Cargo.toml:

[dependencies]
actix-web-helmet = "0.1"

Example

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()));

    // ...
}

License

This project is licensed under the MIT license.

Commit count: 20

cargo fmt