@djangocfg/nextjs 2.1.480 → 2.1.482
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/dist/config/index.d.mts +54 -20
- package/dist/config/index.mjs +8 -3
- package/dist/config/index.mjs.map +1 -1
- package/dist/index.mjs +8 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -9
- package/src/config/createNextConfig.ts +26 -18
- package/src/config/csp.ts +42 -9
package/dist/index.mjs
CHANGED
|
@@ -14,7 +14,7 @@ var require_package = __commonJS({
|
|
|
14
14
|
"package.json"(exports, module) {
|
|
15
15
|
module.exports = {
|
|
16
16
|
name: "@djangocfg/nextjs",
|
|
17
|
-
version: "2.1.
|
|
17
|
+
version: "2.1.482",
|
|
18
18
|
description: "Next.js server utilities: sitemap, health, OG images, contact forms, navigation, config",
|
|
19
19
|
keywords: [
|
|
20
20
|
"nextjs",
|
|
@@ -626,7 +626,12 @@ var CSP_VENDOR_PRESETS = {
|
|
|
626
626
|
imgSrc: ["https://i.vimeocdn.com"]
|
|
627
627
|
}
|
|
628
628
|
};
|
|
629
|
-
var CSP_BASELINE_VENDORS = [
|
|
629
|
+
var CSP_BASELINE_VENDORS = [
|
|
630
|
+
"cloudflare",
|
|
631
|
+
"google-analytics",
|
|
632
|
+
"youtube",
|
|
633
|
+
"vimeo"
|
|
634
|
+
];
|
|
630
635
|
function resolveCspVendors(vendors, warnUnknown = true) {
|
|
631
636
|
const merged = {
|
|
632
637
|
scriptSrc: [],
|
|
@@ -1774,7 +1779,7 @@ function createBaseNextConfig(options = {}) {
|
|
|
1774
1779
|
const cspDisabled = options.csp === false;
|
|
1775
1780
|
const cspExtra = typeof options.csp === "object" ? options.csp : void 0;
|
|
1776
1781
|
const vendorNames = [
|
|
1777
|
-
...cspExtra?.
|
|
1782
|
+
...cspExtra?.baseline === false ? [] : CSP_BASELINE_VENDORS,
|
|
1778
1783
|
...options.stripe ? ["stripe"] : [],
|
|
1779
1784
|
...cspExtra?.vendors ?? []
|
|
1780
1785
|
];
|