Skip to content

Commit 6d17583

Browse files
committed
feat(infra): do not cache static 404s
1 parent 00b4302 commit 6d17583

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

infra/cdn/main.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,13 @@ resource "fastly_service_vcl" "python_org" {
129129
type = "REQUEST"
130130
}
131131

132+
condition {
133+
name = "Don't cache 404s for /static"
134+
priority = 10
135+
statement = "req.url ~ \"^/static/\" && beresp.status == 404"
136+
type = "CACHE"
137+
}
138+
132139
gzip {
133140
name = "Default rules"
134141
content_types = [

0 commit comments

Comments
 (0)