all repos — zola-bearblog @ c5d70ac784a3374eb42fc6d8d36a896ada587002

Port of bear blog theme to zola

add caching headers for netlify and vercel

Alan Pearce
commit

c5d70ac784a3374eb42fc6d8d36a896ada587002

parent

39f7b2de1982d93da413a740fe56eaed404960c9

2 files changed, 9 insertions(+), 0 deletions(-)

jump to
M netlify.tomlnetlify.toml
@@ -23,3 +23,8 @@ # if nothing else works
# openssl dgst -sha256 -binary < templates/style.css.html | openssl enc -base64 # and paste the output after sha256- Content-Security-Policy = "default-src 'none'; img-src 'self'; object-src 'none'; script-src 'none'; style-src 'sha256-p5EfRIhWJi7Zh7WJil3mpIVCZvcu+zebWbMe6B0so8A='; form-action 'none'; base-uri 'self'; frame-ancestors 'none'" +Cache-Control = ''' + max-age=300, + s-maxage=86400, + state-while-revalidate +'''
M vercel.jsonvercel.json
@@ -35,6 +35,10 @@ },
{ "key": "Content-Security-Policy", "value": "default-src 'none'; img-src 'self'; object-src 'none'; script-src 'none'; style-src 'sha256-p5EfRIhWJi7Zh7WJil3mpIVCZvcu+zebWbMe6B0so8A='; form-action 'none'; base-uri 'self'; frame-ancestors 'none'" + }, + { + "key": "Cache-Control", + "value": "max-age=300, s-maxage=86400, state-while-revalidate" } ] }