-
Notifications
You must be signed in to change notification settings - Fork 1
/
aws-simple.config.mjs
36 lines (36 loc) · 1.03 KB
/
aws-simple.config.mjs
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
/** @type {import('aws-simple').ConfigFileDefaultExport} */
export default () => ({
hostedZoneName: `bookmark.wtf`,
terminationProtectionEnabled: true,
routes: [
{
type: `file`,
publicPath: `/*`,
path: `dist/static/index.html`,
responseHeaders: {'cache-control': `no-store`},
},
{
type: `file`,
publicPath: `/apple-touch-icon.png`,
path: `apple-touch-icon.png`,
responseHeaders: {'cache-control': `max-age=86400`}, // 24 hours
},
{
type: `folder`,
publicPath: `/static/*`,
path: `dist/static`,
responseHeaders: {'cache-control': `max-age=157680000`}, // 5 years
},
{
type: `function`,
httpMethod: `GET`,
publicPath: `/api/redirect`,
path: `dist/api/redirect.cjs`,
functionName: `redirect`,
timeoutInSeconds: 3,
environment: {NODE_OPTIONS: `--enable-source-maps`},
requestParameters: {code: {required: true}, state: {required: true}},
throttling: {burstLimit: 5, rateLimit: 10},
},
],
});