Add custom header config for netlify

https://www.netlify.com/docs/headers-and-basic-auth/
This commit is contained in:
curben 2018-09-30 18:24:25 +09:30
parent be05e66517
commit 98e6826ade
3 changed files with 18 additions and 3 deletions

View File

@ -26,6 +26,8 @@ category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:
include:
- _headers
# Writing
new_post_name: :title.md # File name of new posts

View File

@ -10,16 +10,16 @@
X-Content-Type-Options = "nosniff"
[[headers]]
for = "*.html"
for = "/*.html"
[headers.value]
Content-Encoding = "gzip, br"
[[headers]]
for = "*.css"
for = "/*.css"
[headers.value]
Content-Encoding = "gzip, br"
[[headers]]
for = "*.js"
for = "/*.js"
[headers.value]
Content-Encoding = "gzip, br"

13
source/_headers Normal file
View File

@ -0,0 +1,13 @@
/*
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
/*.html
Content-Encoding: gzip, br
/*.css"
Content-Encoding: gzip, br
/*.js"
Content-Encoding: gzip, br