#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

#73 in #http-header

Download history 93/week @ 2024-06-21 64/week @ 2024-06-28 90/week @ 2024-07-05 116/week @ 2024-07-12 92/week @ 2024-07-19 90/week @ 2024-07-26 115/week @ 2024-08-02 89/week @ 2024-08-09 146/week @ 2024-08-16 85/week @ 2024-08-23 21/week @ 2024-08-30 78/week @ 2024-09-06 47/week @ 2024-09-13 56/week @ 2024-09-20 158/week @ 2024-09-27 192/week @ 2024-10-04

488 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
~124K SLoC