Improve loading performance

This commit is contained in:
Hazem Krimi
2023-11-22 18:18:23 +01:00
parent b790da4c73
commit e05564729d
15 changed files with 25 additions and 8 deletions
+17
View File
@@ -39,3 +39,20 @@ enableRobotsTXT = true
name = 'Contact'
url = '/contact'
weight = 5
[[deployment.matchers]]
# Cache static assets for 1 year.
pattern = "^.+\\.(js|css|svg|ttf)$"
cacheControl = "max-age=31536000, no-transform, public"
gzip = true
[[deployment.matchers]]
pattern = "^.+\\.(gif|png|jpg|webp)$"
cacheControl = "max-age=31536000, no-transform, public"
gzip = false
[[deployment.matchers]]
# Set custom content type for /sitemap.xml
pattern = "^sitemap\\.xml$"
contentType = "application/xml"
gzip = true
[[deployment.matchers]]
pattern = "^.+\\.(html|xml|json)$"
gzip = true