#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

#82 in #http-header

Download history 83/week @ 2024-07-22 93/week @ 2024-07-29 133/week @ 2024-08-05 65/week @ 2024-08-12 174/week @ 2024-08-19 38/week @ 2024-08-26 18/week @ 2024-09-02 91/week @ 2024-09-09 51/week @ 2024-09-16 67/week @ 2024-09-23 164/week @ 2024-09-30 182/week @ 2024-10-07 110/week @ 2024-10-14 174/week @ 2024-10-21 149/week @ 2024-10-28 162/week @ 2024-11-04

603 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