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 code_dir: downloads/code
i18n_dir: :lang i18n_dir: :lang
skip_render: skip_render:
include:
- _headers
# Writing # Writing
new_post_name: :title.md # File name of new posts new_post_name: :title.md # File name of new posts

View File

@ -10,16 +10,16 @@
X-Content-Type-Options = "nosniff" X-Content-Type-Options = "nosniff"
[[headers]] [[headers]]
for = "*.html" for = "/*.html"
[headers.value] [headers.value]
Content-Encoding = "gzip, br" Content-Encoding = "gzip, br"
[[headers]] [[headers]]
for = "*.css" for = "/*.css"
[headers.value] [headers.value]
Content-Encoding = "gzip, br" Content-Encoding = "gzip, br"
[[headers]] [[headers]]
for = "*.js" for = "/*.js"
[headers.value] [headers.value]
Content-Encoding = "gzip, br" 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