Add cache header to pages

pull/282/head
Amio 2019-06-03 21:31:18 +08:00
rodzic 576c4b8eca
commit 69cf7c8c39
1 zmienionych plików z 14 dodań i 4 usunięć

Wyświetl plik

@ -7,12 +7,22 @@
"regions": ["sfo", "lhr", "hnd"],
"builds": [
{ "src": "endpoints/*.ts", "use": "@now/node" },
{ "src": "package.json", "use": "@now/static-build", "config": {
"distDir": "out"
} }
{ "src": "package.json", "use": "@now/static-build", "config": { "distDir": "out" } }
],
"routes": [
{ "src": "/(?<name>[^/]+)/.*", "dest": "/endpoints/$name.ts" }
{ "src": "/(?<name>[^/]+)/.*", "dest": "/endpoints/$name.ts" },
{
"src": "/",
"headers": {
"cache-control": "public, s-maxage=604800, stale-while-revalidate: 86400"
}
},
{
"src": "/docs/.*",
"headers": {
"cache-control": "public, s-maxage=604800, stale-while-revalidate: 86400"
}
}
],
"env": {
"GH_TOKENS": "@badgen-gh-tokens",