4 releases (stable)

1.2.0 Oct 13, 2019
1.1.0 May 28, 2019
1.0.0 May 26, 2019
0.0.0 May 25, 2019

#4 in #helmet

50 downloads per month
Used in serv4rs

MIT/Apache

24KB
291 lines

armor

crates.io version build status downloads docs.rs docs

HTTP Security Headers. Adapted from helmetjs.

Examples

Basic usage

let mut headers = http::HeaderMap::new();
armor::armor(&mut headers);
assert_eq!(headers["X-Content-Type-Options"], "nosniff");
assert_eq!(headers["X-XSS-Protection"], "1; mode=block");

Installation

$ cargo add armor

Safety

This crate uses #![deny(unsafe_code)] to ensure everything is implemented in 100% Safe Rust.

Contributing

Want to join us? Check out our "Contributing" guide and take a look at some of these issues:

References

None.

License

MIT OR Apache-2.0

Dependencies

~1.4–2.2MB
~46K SLoC