@salesforce/pwa-kit-create-app 3.2.0 → 3.2.1

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.
@@ -9,6 +9,7 @@
9
9
 
10
10
  import path from 'path'
11
11
  import {getRuntime} from '@salesforce/pwa-kit-runtime/ssr/server/express'
12
+ import {defaultPwaKitSecurityHeaders} from '@salesforce/pwa-kit-runtime/utils/middleware'
12
13
  import {getConfig} from '@salesforce/pwa-kit-runtime/utils/ssr-config'
13
14
  import helmet from 'helmet'
14
15
 
@@ -34,11 +35,11 @@ const options = {
34
35
  const runtime = getRuntime()
35
36
 
36
37
  const {handler} = runtime.createHandler(options, (app) => {
37
- // Set HTTP security headers
38
+ // Set default HTTP security headers required by PWA Kit
39
+ app.use(defaultPwaKitSecurityHeaders)
40
+ // Set custom HTTP security headers
38
41
  app.use(
39
42
  helmet({
40
- // pwa-kit-runtime ensures that the Content-Security-Policy header always contains the
41
- // directives required for PWA Kit to function. Add custom directives here.
42
43
  contentSecurityPolicy: {
43
44
  useDefaults: true,
44
45
  directives: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/pwa-kit-create-app",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
4
4
  "description": "Salesforce's project generator tool",
5
5
  "homepage": "https://github.com/SalesforceCommerceCloud/pwa-kit/tree/develop/packages/pwa-kit-create-app#readme",
6
6
  "bugs": {
@@ -38,13 +38,13 @@
38
38
  "tar": "^6.1.13"
39
39
  },
40
40
  "devDependencies": {
41
- "@salesforce/pwa-kit-dev": "3.2.0",
42
- "internal-lib-build": "3.2.0",
41
+ "@salesforce/pwa-kit-dev": "3.2.1",
42
+ "internal-lib-build": "3.2.1",
43
43
  "verdaccio": "^5.22.1"
44
44
  },
45
45
  "engines": {
46
46
  "node": "^16.11.0 || ^18.0.0",
47
47
  "npm": "^8.0.0 || ^9.0.0"
48
48
  },
49
- "gitHead": "5ec74f88e7bf9ba10a2f86f22a137311ee9bf1b9"
49
+ "gitHead": "2c8502478dc9f571f57042565d3d5938e46336a2"
50
50
  }
Binary file
Binary file
Binary file
Binary file