Created
July 3, 2018 12:06
-
-
Save abedra/adc373bde201e20088210938d7ef6dcd to your computer and use it in GitHub Desktop.
ocaml / mirageos unikernel webserver secure headers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let add_headers (path: string): Cohttp.Header.t = | |
Cohttp.Header.add_list (Cohttp.Header.init ()) [ | |
("Strict-Transport-Security", "max-age=31536000; includeSubdomains; preload"); | |
("Content-Type", (Magic_mime.lookup path)); | |
("X-XSS-Protection", "1; mode=block"); | |
("X-Frame-Options", "DENY"); | |
("X-Content-Type-Options", "nosniff") | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment