Browse Source

Add netlify _headers file for custom headers

master
Bernhard Fröhlich 1 month ago
parent
commit
b1135379b4
Signed by: Bernhard Froehlich <decke@bluelife.at> GPG Key ID: 4DD88C3F9F3B8333
2 changed files with 20 additions and 0 deletions
  1. 15
    0
      config.toml
  2. 5
    0
      layouts/index.headers

+ 15
- 0
config.toml View File

@@ -46,3 +46,18 @@ pygmentsStyle = "native"
46 46
   [params.logo]
47 47
   url = "bluelife_logo.png"
48 48
   alt = "Logo"
49
+
50
+[mediaTypes]
51
+  [mediaTypes."text/netlify"]
52
+    suffixes = []
53
+    delimiter = ""
54
+
55
+[outputs]
56
+  home = [ "HTML", "RSS", "HEADERS" ]
57
+
58
+[outputFormats]
59
+  [outputFormats.HEADERS]
60
+    mediatype = "text/netlify"
61
+    baseName = "_headers"
62
+    isPlainText = true
63
+    notAlternative = true

+ 5
- 0
layouts/index.headers View File

@@ -0,0 +1,5 @@
1
+/*
2
+  X-Frame-Options: DENY
3
+  X-XSS-Protection: 1; mode=block
4
+  X-Content-Type-Options: nosniff
5
+  Referrer-Policy: origin-when-cross-origin

Loading…
Cancel
Save