Skip to content

Commit fae37fe

Browse files
committed
Try to stop these WSOD caching issues
1 parent 0ce94dd commit fae37fe

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

serverless.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,27 @@ custom:
4848
client:
4949
bucketName: ${self:custom.rootName}
5050
distributionFolder: build
51+
52+
objectHeaders:
53+
# Cache-bustable assets (fingerprinted)
54+
"static/*":
55+
- name: Cache-Control
56+
value: "public, max-age=31536000, immutable"
57+
58+
# HTML should never be cached
59+
"index.html":
60+
- name: Cache-Control
61+
value: "no-cache, no-store, must-revalidate"
62+
63+
"error.html":
64+
- name: Cache-Control
65+
value: "no-cache, no-store, must-revalidate"
66+
67+
# Optional: catch-all fallback
68+
ALL_OBJECTS:
69+
- name: Cache-Control
70+
value: "public, max-age=3600"
71+
5172
# s3LocalPath: C:\Projects\AbstractPlay\front\build\
5273
s3LocalPath: ./build/
5374

0 commit comments

Comments
 (0)