use crate::content_type::content_type;
const SERVED: [(&str, &str); 5] = [
("content-security-policy", "sandbox allow-scripts"),
("access-control-allow-origin", "*"),
("access-control-expose-headers", "*"),
("x-content-type-options", "nosniff"),
("cache-control", "max-age=31536000, immutable"),
];
#[must_use]
pub fn served_headers(path: &str) -> Vec<(&'static str, &'static str)> {
let mut headers = vec![("content-type", content_type(path))];
headers.extend(SERVED);
headers
}
#[must_use]
pub fn refusal_headers() -> [(&'static str, &'static str); 2] {
[
("content-type", "text/plain; charset=utf-8"),
("access-control-allow-origin", "*"),
]
}