Skip to content

Instantly share code, notes, and snippets.

@codfish
Last active Nov 13, 2020
Embed
What would you like to do?
Cache control headers for static assets with Now. http://r.codfi.sh/Ukim4l
{
"version": 2,
"name": "codfish.io",
"alias": "codfish.io",
"builds": [{ "src": "package.json", "use": "@now/static-build" }],
"routes": [
{
"src": ".*\\.(js|css|jpg|jpeg|gif|png|svg|txt|ttf|woff2|webmanifest)$",
"headers": {
"Cache-Control": "public, max-age=157680000, s-maxage=157680000"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment