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

axum-helmet

HTTP security headers middleware core for axum web framework

1 unstable release

0.1.0 Jan 5, 2024

#103 in #http-header

Download history 116/week @ 2024-10-13 168/week @ 2024-10-20 140/week @ 2024-10-27 175/week @ 2024-11-03 196/week @ 2024-11-10 52/week @ 2024-11-17 122/week @ 2024-11-24 114/week @ 2024-12-01 115/week @ 2024-12-08 256/week @ 2024-12-15 41/week @ 2024-12-22 53/week @ 2024-12-29 89/week @ 2025-01-05 144/week @ 2025-01-12 180/week @ 2025-01-19 185/week @ 2025-01-26

608 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