[][src]Function armor::dont_sniff_mimetype

pub fn dont_sniff_mimetype(headers: &mut HeaderMap)

Prevent browsers from trying to guess (“sniff”) the MIME type, which can have security implications.

read more

Examples

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