tide-helmet 1.0.0

HTTP security headers middleware for Tide web framework
Documentation

tide-helmet - Security Middleware for the Tide 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]
tide-helmet = "0.3"

Example

use tide_helmet::Helmet;

#[async_std::main]
async fn main() -> tide::Result<()> {
    let mut app = tide::new();
    app.with(Helmet::default());
    app.at("/").get(|_| async { Ok("Hello, world!") });
    app.listen("0.0.0.0:3000").await?;
    Ok(())
}

License

This project is licensed under the MIT license.