ntex-helmet

Crates.iontex-helmet
lib.rsntex-helmet
version0.1.3
sourcesrc
created_at2023-12-30 01:40:02.254064
updated_at2024-01-05 20:31:39.928547
descriptionHTTP security headers middleware for ntex-web
homepagehttps://github.com/danielkov/ntex-helmet
repositoryhttps://github.com/danielkov/ntex-helmet
max_upload_size
id1083821
size50,813
Daniel Emod Kovacs (danielkov)

documentation

README

ntex-helmet - Security Middleware for ntex web framework

crate docs

ntex-helmet is a security middleware for the ntex 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]
ntex-helmet = "0.1"

Example

use ntex::web::{self, App, HttpResponse};
use ntex_helmet::Helmet;

#[ntex::main]
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: 9

cargo fmt