Skip to content

Commit 5df00af

Browse files
committed
Added additional headers for content security and nosniff
1 parent 24da674 commit 5df00af

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

main.tf

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,30 @@ resource "fastly_service_vcl" "files_service" {
5454
source = "\"1\""
5555
}
5656

57+
# Additional headers for content security & nosniff
58+
59+
header {
60+
name = "Content security policy"
61+
action = "set"
62+
type = "request"
63+
priority = 10
64+
65+
destination = "http.Content-Security-Policy"
66+
source = "\"default-src 'none'; form-action 'none'\""
67+
}
68+
69+
header {
70+
name = "Nosniff"
71+
action = "set"
72+
type = "request"
73+
priority = 10
74+
75+
destination = "http.X-Content-Type-Options"
76+
source = "\"nosniff\""
77+
}
78+
79+
80+
5781
# Force TLS/HSTS settings
5882
# Creates similar objects to what the GUI switch creates.
5983

0 commit comments

Comments
 (0)