@elliemae/pui-cli 8.42.1 → 8.42.2

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.
@@ -60,6 +60,11 @@ const sendFileWithCSPNonce = ({
60
60
  res.sendStatus(404);
61
61
  } else {
62
62
  res.set("Content-Type", "text/html");
63
+ res.set("Reporting-Endpoints", `csp-report-uri="${CSP_REPORT_URI}"`);
64
+ res.set(
65
+ "Permissions-Policy",
66
+ "geolocation=(), camera=(), microphone=(), interest-cohort=()"
67
+ );
63
68
  res.send(html.replace(nonceRegex, res.locals.cspNonce));
64
69
  }
65
70
  });
@@ -87,7 +92,8 @@ const csp = (app) => {
87
92
  objectSrc: ["'none'"],
88
93
  scriptSrc: getScriptSrc(),
89
94
  upgradeInsecureRequests: [],
90
- reportTo: CSP_REPORT_URI
95
+ reportUri: CSP_REPORT_URI,
96
+ reportTo: "csp-report-uri"
91
97
  },
92
98
  reportOnly: process.env.CSP_REPORT_ONLY !== "false"
93
99
  },
@@ -54,11 +54,6 @@ const setupDefaultMiddlewares = (app) => {
54
54
  app.use((0, import_cors.default)());
55
55
  app.options("*", (0, import_cors.default)());
56
56
  (0, import_csp.csp)(app);
57
- app.set("Cross-Origin-Opener-Policy", "same-origin-allow-popups");
58
- app.set(
59
- "Permissions-Policy",
60
- "geolocation=(), camera=(), microphone=(), interest-cohort=()"
61
- );
62
57
  app.use(import_express.default.urlencoded({ extended: false }));
63
58
  app.use(import_express.default.text({ type: "text/plain" }));
64
59
  app.use(import_express.default.json({ type: "application/json" }));
@@ -26,6 +26,11 @@ const sendFileWithCSPNonce = ({
26
26
  res.sendStatus(404);
27
27
  } else {
28
28
  res.set("Content-Type", "text/html");
29
+ res.set("Reporting-Endpoints", `csp-report-uri="${CSP_REPORT_URI}"`);
30
+ res.set(
31
+ "Permissions-Policy",
32
+ "geolocation=(), camera=(), microphone=(), interest-cohort=()"
33
+ );
29
34
  res.send(html.replace(nonceRegex, res.locals.cspNonce));
30
35
  }
31
36
  });
@@ -53,7 +58,8 @@ const csp = (app) => {
53
58
  objectSrc: ["'none'"],
54
59
  scriptSrc: getScriptSrc(),
55
60
  upgradeInsecureRequests: [],
56
- reportTo: CSP_REPORT_URI
61
+ reportUri: CSP_REPORT_URI,
62
+ reportTo: "csp-report-uri"
57
63
  },
58
64
  reportOnly: process.env.CSP_REPORT_ONLY !== "false"
59
65
  },
@@ -20,11 +20,6 @@ const setupDefaultMiddlewares = (app) => {
20
20
  app.use(cors());
21
21
  app.options("*", cors());
22
22
  csp(app);
23
- app.set("Cross-Origin-Opener-Policy", "same-origin-allow-popups");
24
- app.set(
25
- "Permissions-Policy",
26
- "geolocation=(), camera=(), microphone=(), interest-cohort=()"
27
- );
28
23
  app.use(express.urlencoded({ extended: false }));
29
24
  app.use(express.text({ type: "text/plain" }));
30
25
  app.use(express.json({ type: "application/json" }));