Fork of Chiri for Astro for my blog
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix:cache handling

the3ash a7b3c9c9 a1d63687

+30 -36
+30 -36
netlify.toml
··· 20 20 [build.processing.html] 21 21 pretty_urls = true 22 22 23 - # Global headers for performance 24 - [[headers]] 25 - for = "/*" 26 - [headers.values] 27 - X-Frame-Options = "SAMEORIGIN" 28 - X-Content-Type-Options = "nosniff" 29 - Referrer-Policy = "strict-origin-when-cross-origin" 30 - Permissions-Policy = "geolocation=(), microphone=(), camera=(), fullscreen=(self)" 31 - Content-Security-Policy = ''' 32 - default-src 'self'; 33 - script-src 'self' 'unsafe-inline' 'unsafe-eval' https:; 34 - style-src 'self' 'unsafe-inline' https:; 35 - img-src 'self' data: https: blob:; 36 - font-src 'self' data: https:; 37 - frame-src https:; 38 - connect-src 'self' https:; 39 - object-src 'none'; 40 - worker-src 'self' blob:; 41 - child-src 'self' blob:; 42 - ''' 43 - 44 23 # Static assets caching 45 24 [[headers]] 46 - for = "/assets/*" 25 + for = "/fonts/*" 47 26 [headers.values] 48 27 Cache-Control = "public, max-age=31536000, immutable" 49 28 Vary = "Accept-Encoding" 50 29 51 30 [[headers]] 52 - for = "/fonts/*" 31 + for = "/_astro/*" 53 32 [headers.values] 54 33 Cache-Control = "public, max-age=31536000, immutable" 55 34 Vary = "Accept-Encoding" 56 35 57 36 [[headers]] 58 - for = "/_astro/*" 37 + for = "/*.css" 59 38 [headers.values] 60 39 Cache-Control = "public, max-age=31536000, immutable" 61 40 Vary = "Accept-Encoding" 62 41 63 42 [[headers]] 64 - for = "*.css" 43 + for = "/*.js" 65 44 [headers.values] 66 45 Cache-Control = "public, max-age=31536000, immutable" 67 46 Vary = "Accept-Encoding" 68 47 69 48 [[headers]] 70 - for = "*.js" 49 + for = "/assets/*" 71 50 [headers.values] 72 51 Cache-Control = "public, max-age=31536000, immutable" 73 52 Vary = "Accept-Encoding" 74 53 75 - # HTML caching for static pages 54 + # Image optimization 76 55 [[headers]] 77 - for = "*.html" 56 + for = "/*.jpg" 78 57 [headers.values] 79 - Cache-Control = "public, max-age=3600, s-maxage=7200" 58 + Cache-Control = "public, max-age=31536000, immutable" 80 59 Vary = "Accept-Encoding" 81 60 82 - # Image optimization 83 61 [[headers]] 84 - for = "*.jpg" 62 + for = "/*.png" 85 63 [headers.values] 86 64 Cache-Control = "public, max-age=31536000, immutable" 87 65 Vary = "Accept-Encoding" 88 66 89 67 [[headers]] 90 - for = "*.png" 68 + for = "/*.webp" 91 69 [headers.values] 92 70 Cache-Control = "public, max-age=31536000, immutable" 93 71 Vary = "Accept-Encoding" 94 72 73 + # HTML caching for static pages 95 74 [[headers]] 96 - for = "*.webp" 75 + for = "/*.html" 97 76 [headers.values] 98 - Cache-Control = "public, max-age=31536000, immutable" 77 + Cache-Control = "public, max-age=3600, s-maxage=7200" 99 78 Vary = "Accept-Encoding" 100 79 101 80 # Homepage with resource hints and shorter cache ··· 113 92 Cache-Control = "public, max-age=7200, s-maxage=14400" 114 93 Vary = "Accept-Encoding" 115 94 116 - # Enable compression 95 + # Global headers for performance 117 96 [[headers]] 118 97 for = "/*" 119 98 [headers.values] 120 - Vary = "Accept-Encoding" 99 + X-Frame-Options = "SAMEORIGIN" 100 + X-Content-Type-Options = "nosniff" 101 + Referrer-Policy = "strict-origin-when-cross-origin" 102 + Permissions-Policy = "geolocation=(), microphone=(), camera=(), fullscreen=(self)" 103 + Content-Security-Policy = ''' 104 + default-src 'self'; 105 + script-src 'self' 'unsafe-inline' 'unsafe-eval' https:; 106 + style-src 'self' 'unsafe-inline' https:; 107 + img-src 'self' data: https: blob:; 108 + font-src 'self' data: https:; 109 + frame-src https:; 110 + connect-src 'self' https:; 111 + object-src 'none'; 112 + worker-src 'self' blob:; 113 + child-src 'self' blob:; 114 + ''' 121 115 122 116 123 117