Skip to content

Instantly share code, notes, and snippets.

@ryanburnette

ryanburnette/Caddyfile

Last active Aug 18, 2020
Embed
What would you like to do?
caddy cache strategy
(asset-paths) {
path *.bmp *.jpg *.png *.svg *.gif *.pdf *.css *.js
}
(cache) {
@content {
not {
import asset-paths
}
}
header @content cache-control max-age=0
@assets {
import asset-paths
}
header @assets cache-control max-age=31536000
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.