packaton 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "packaton",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "type": "module",
5
5
  "author": "Eric Fortis",
6
6
  "license": "MIT",
package/src/app-prod.js CHANGED
@@ -58,7 +58,7 @@ export async function buildStaticPages(config) {
58
58
  // TODO remap media in css and js
59
59
  await doc.inlineMinifiedCSS()
60
60
  await doc.inlineMinifiedJS()
61
- write(pDist + route + config.outputExtension, doc.html)
61
+ write(join(pDist, route + config.outputExtension), doc.html)
62
62
  cspByRoute.push([route, doc.csp()])
63
63
  }
64
64
 
@@ -9,7 +9,11 @@ export function netiflyAndCloudflareHeadersPlugin(config, cspByRoute, MEDIA_URL)
9
9
  const r = route === '/index'
10
10
  ? '/'
11
11
  : route
12
- return `${r}\n Content-Security-Policy: ${csp}`
12
+ return [
13
+ r,
14
+ ` Content-Security-Policy: ${csp}`,
15
+ ` Cache-Control: public,max-age=60`
16
+ ].join('\n')
13
17
  })
14
18
  cspHeaders.push(`${MEDIA_URL}/*`)
15
19
  cspHeaders.push(' Cache-Control: public,max-age=31536000,immutable')