Add redirect rule for js and css

set their content-encoding header as br (for brotli compression)
This commit is contained in:
curben 2018-10-02 10:50:05 +09:30
parent 96ad70e1e1
commit 60de0c28c4
2 changed files with 43 additions and 0 deletions

View File

@ -8,3 +8,37 @@
X-Frame-Options = "DENY"
X-XSS-Protection = "1; mode=block"
X-Content-Type-Options = "nosniff"
[[headers]]
for = "/js/typing.js.br"
[headers.values]
Content-Encoding = "br"
[[headers]]
for = "/js/sri-fallback.min.js.br"
[headers.values]
Content-Encoding = "br"
[[headers]]
for = "/css/typing.css.br"
[headers.values]
Content-Encoding = "br"
[[redirects]]
from = "/js/typing.js"
to = "/js/typing.js.br"
status = 200
force = true
[[redirects]]
from = "/js/sri-fallback.min.js"
to = "/js/sri-fallback.min.js.br"
status = 200
force = true
[[redirects]]
from = "/css/typing.css"
to = "/css/typing.css.br"
status = 200
force = true

View File

@ -3,3 +3,12 @@
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
/js/typing.js.br
Content-Encoding: br
/js/sr-fallback.min.js.br
Content-Encoding: br
/css/typing.css.br
Content-Encoding: br