-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupload.json
More file actions
44 lines (44 loc) · 1.58 KB
/
upload.json
File metadata and controls
44 lines (44 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
[{
"_note": "hashres'd files (css and js folders) get a 2 year max-age. gzip the css and js folders and any css/js in components",
"src": [ "build/css/**/*.*", "build/js/**/*.*", "build/components/**/*.{css,js}" ],
"dest": "/",
"rel": "build",
"options": {
"gzip": true,
"headers": { "Cache-Control": "max-age=630720000, public" }
}
}, {
"_note": "anything not CSS/JS in components gets uploaded without gzipping, still with a 2 year max-age (hopefully this doesn't cause issues)",
"src": [ "build/components/**/*.*", "!build/components/**/*.{css,js}" ],
"dest": "/",
"rel": "build",
"options": {
"headers": { "Cache-Control": "max-age=630720000, public" }
}
}, {
"_note": "allow blog posts and permalinks themselves to be cached (for 15 days). we can invalidate things if required",
"src": [ "build/blog/posts/**/*.*", "build/post/**/*.*" ],
"dest": "/",
"rel": "build",
"options": {
"gzip": true,
"gzipExclude": [ ".jpg", ".png" ],
"headers": { "Cache-Control": "max-age=1296000, public" }
}
}, {
"_note": "by default, the rest won't be cached, since it's mutable. any stray css/js/html/json will be gzipped",
"src": [ "build/**/*.{css,js,json,html}", "!build/{components,css,js,post}/**/*.*", "!build/blog/posts/**/*.*" ],
"dest": "/",
"rel": "build",
"options": {
"gzip": true,
"headers": { "Cache-Control": "max-age=0, public" }
}
}, {
"src": [ "build/**/*.*", "!build/**/*.{css,js,json,html}", "!build/{components,css,js,post}/**/*.*", "!build/blog/posts/**/*.*" ],
"dest": "/",
"rel": "build",
"options": {
"headers": { "Cache-Control": "max-age=0, public" }
}
}]