#http-header #axum #security #middleware #helmet #web-framework #rust

axum-helmet

HTTP security headers middleware core for axum web framework

1 unstable release

0.1.0 Jan 5, 2024

#98 in #http-header

Download history 78/week @ 2024-09-06 47/week @ 2024-09-13 56/week @ 2024-09-20 158/week @ 2024-09-27 196/week @ 2024-10-04 102/week @ 2024-10-11 171/week @ 2024-10-18 131/week @ 2024-10-25 181/week @ 2024-11-01 216/week @ 2024-11-08 52/week @ 2024-11-15 93/week @ 2024-11-22 136/week @ 2024-11-29 107/week @ 2024-12-06 252/week @ 2024-12-13 56/week @ 2024-12-20

569 downloads per month

MIT license

72KB
951 lines

axum-core - Security Middleware for the axum web framework

crate docs

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]
axum-helmet = "0.1"

Example

use axum::{self, Router};
use axum_helmet::Helmet;

let app = Router::new()
    .route("/", axum::handler::get(|| async { "Hello, World!" }))
    .layer(Helmet::default());

// ...

License

This project is licensed under the MIT license.

Dependencies

~5–11MB
~123K SLoC