@berachain/config 0.1.24 → 0.1.26-beta.0
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/{chunk-OA5M6XYF.cjs → chunk-2JZ7QJEW.cjs} +0 -7
- package/dist/{chunk-4WAGOEXT.mjs → chunk-AP2XG6GJ.mjs} +0 -7
- package/dist/internal/header-sources.cjs +23 -6
- package/dist/internal/header-sources.d.ts +16 -4
- package/dist/internal/header-sources.d.ts.map +1 -1
- package/dist/internal/header-sources.mjs +23 -6
- package/dist/internal/nextjs/const.d.ts.map +1 -1
- package/dist/internal/nextjs/index.cjs +2 -2
- package/dist/internal/nextjs/index.mjs +1 -1
- package/dist/internal/nextjs/utils/index.cjs +2 -2
- package/dist/internal/nextjs/utils/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -76,13 +76,6 @@ var IMAGE_REMOTE_PATTERNS = [
|
|
|
76
76
|
hostname: "imagedelivery.net",
|
|
77
77
|
port: "",
|
|
78
78
|
pathname: "/qNj7Q3MCke89zoKzav7eDQ/**"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
protocol: "https",
|
|
82
|
-
hostname: "www.clearstar.xyz",
|
|
83
|
-
// bend curator logo
|
|
84
|
-
port: "",
|
|
85
|
-
pathname: "/logo.png"
|
|
86
79
|
}
|
|
87
80
|
];
|
|
88
81
|
|
|
@@ -76,13 +76,6 @@ var IMAGE_REMOTE_PATTERNS = [
|
|
|
76
76
|
hostname: "imagedelivery.net",
|
|
77
77
|
port: "",
|
|
78
78
|
pathname: "/qNj7Q3MCke89zoKzav7eDQ/**"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
protocol: "https",
|
|
82
|
-
hostname: "www.clearstar.xyz",
|
|
83
|
-
// bend curator logo
|
|
84
|
-
port: "",
|
|
85
|
-
pathname: "/logo.png"
|
|
86
79
|
}
|
|
87
80
|
];
|
|
88
81
|
|
|
@@ -127,6 +127,7 @@ var modules = {
|
|
|
127
127
|
// /api/honey/* and /api/pol/* (covered by 'self'), not direct browser
|
|
128
128
|
// requests to the upstream URLs.
|
|
129
129
|
config.pol.bribeBoostApi,
|
|
130
|
+
_chunkYT7WZDGIcjs.getUriFromLink.call(void 0, config.beep),
|
|
130
131
|
_chunkYT7WZDGIcjs.getUriFromLink.call(void 0, config.api),
|
|
131
132
|
_chunkAU3LYJABcjs.jsonRpcUrl,
|
|
132
133
|
_chunkAU3LYJABcjs.publicJsonRpcUrl,
|
|
@@ -155,7 +156,8 @@ var modules = {
|
|
|
155
156
|
"https://open-api.openocean.finance/",
|
|
156
157
|
"https://api.haiku.trade/",
|
|
157
158
|
"https://api.fly.trade/",
|
|
158
|
-
"https://api.enso.finance/"
|
|
159
|
+
"https://api.enso.finance/",
|
|
160
|
+
"https://api.enso.build/"
|
|
159
161
|
]
|
|
160
162
|
},
|
|
161
163
|
walletConnect: {
|
|
@@ -273,8 +275,8 @@ var modules = {
|
|
|
273
275
|
var headerSourceModules = modules;
|
|
274
276
|
function getContentSecurityPolicy({
|
|
275
277
|
isDevelopment,
|
|
276
|
-
nonce,
|
|
277
278
|
cspReporting,
|
|
279
|
+
dynamicScriptCsp = {},
|
|
278
280
|
modules: enabledModules = {},
|
|
279
281
|
...args
|
|
280
282
|
}) {
|
|
@@ -314,12 +316,21 @@ function getContentSecurityPolicy({
|
|
|
314
316
|
const mediaSources = dedupeCspSources(
|
|
315
317
|
collect("media").concat(_nullishCoalesce(args.mediaSources, () => ( [])))
|
|
316
318
|
);
|
|
319
|
+
const scriptSources = dynamicScriptCsp === "disabled" ? dedupeCspSources(collect("script").concat(_nullishCoalesce(args.scriptSources, () => ( [])))) : dedupeCspSources(
|
|
320
|
+
[
|
|
321
|
+
"'strict-dynamic'",
|
|
322
|
+
isDevelopment ? "'unsafe-eval'" : "",
|
|
323
|
+
"'sha256-k2HGvaYkGyYZxOwKGxgE1mr06tZEDcEXNZ5mdcldK0o='",
|
|
324
|
+
dynamicScriptCsp.nonce ? `'nonce-${dynamicScriptCsp.nonce}'` : "",
|
|
325
|
+
..._nullishCoalesce(dynamicScriptCsp.sha, () => ( []))
|
|
326
|
+
].filter((source) => source !== "")
|
|
327
|
+
);
|
|
317
328
|
let cspHeader = `
|
|
318
329
|
default-src 'self' ${defaultSrc.join(" ")};
|
|
319
330
|
base-uri 'self';
|
|
320
331
|
frame-src 'self' ${frameSources.join(" ")};
|
|
321
332
|
frame-ancestors 'self' https://*.posthog.com;
|
|
322
|
-
script-src 'self'
|
|
333
|
+
script-src 'self' ${scriptSources.join(" ")};
|
|
323
334
|
worker-src 'self' blob: data: ${workerSources.join(" ")};
|
|
324
335
|
font-src 'self' ${fontSources.join(" ")};
|
|
325
336
|
style-src 'self' ${styleSources.join(" ")} 'unsafe-inline';
|
|
@@ -352,16 +363,19 @@ function cspMiddleware({
|
|
|
352
363
|
csp
|
|
353
364
|
}) {
|
|
354
365
|
const sentryCspEndpoint = _optionalChain([getSentryKeys, 'call', _5 => _5(), 'optionalAccess', _6 => _6.cspEndpoint]);
|
|
355
|
-
const nonce = Buffer.from(crypto.randomUUID()).toString("base64");
|
|
366
|
+
const nonce = _optionalChain([csp, 'optionalAccess', _7 => _7.dynamicScriptCsp]) !== "disabled" ? _nullishCoalesce(_optionalChain([csp, 'optionalAccess', _8 => _8.dynamicScriptCsp, 'optionalAccess', _9 => _9.nonce]), () => ( Buffer.from(crypto.randomUUID()).toString("base64"))) : void 0;
|
|
356
367
|
const isDevelopment = process.env.NODE_ENV === "development";
|
|
357
368
|
const headers = [
|
|
358
369
|
{
|
|
359
370
|
key: "Content-Security-Policy",
|
|
360
371
|
value: getContentSecurityPolicy({
|
|
361
372
|
...csp,
|
|
373
|
+
dynamicScriptCsp: _optionalChain([csp, 'optionalAccess', _10 => _10.dynamicScriptCsp]) === "disabled" ? csp.dynamicScriptCsp : {
|
|
374
|
+
..._optionalChain([csp, 'optionalAccess', _11 => _11.dynamicScriptCsp]),
|
|
375
|
+
nonce
|
|
376
|
+
},
|
|
362
377
|
isDevelopment,
|
|
363
|
-
cspReporting: _optionalChain([sentryCspEndpoint, 'optionalAccess',
|
|
364
|
-
nonce
|
|
378
|
+
cspReporting: _optionalChain([sentryCspEndpoint, 'optionalAccess', _12 => _12.toString, 'call', _13 => _13()])
|
|
365
379
|
})
|
|
366
380
|
},
|
|
367
381
|
{
|
|
@@ -388,6 +402,9 @@ function cspMiddleware({
|
|
|
388
402
|
});
|
|
389
403
|
}
|
|
390
404
|
for (const header of headers) {
|
|
405
|
+
if (!header.value) {
|
|
406
|
+
continue;
|
|
407
|
+
}
|
|
391
408
|
response.headers.set(header.key, header.value);
|
|
392
409
|
}
|
|
393
410
|
return response;
|
|
@@ -19,10 +19,12 @@ interface HeaderSources {
|
|
|
19
19
|
worker?: string[];
|
|
20
20
|
/** media-src */
|
|
21
21
|
media?: string[];
|
|
22
|
+
/** script-src (if csp is not dynamic) */
|
|
23
|
+
script?: string[];
|
|
22
24
|
}
|
|
23
25
|
declare const modules: {
|
|
24
26
|
readonly berachain: {
|
|
25
|
-
readonly connect: ["https://*.berachain.com/", "https://*.berachain-staging.com/", "https://raw.githubusercontent.com/berachain/metadata/", "https://imagedelivery.net/qNj7Q3MCke89zoKzav7eDQ/", "https://*.quiknode.pro", "https://api.goldsky.com/api/public/project_clq1h5ct0g4a201x18tfte5iv/subgraphs/", string, string, string, string, string | undefined, "https://api.routescan.io/v2/network/"];
|
|
27
|
+
readonly connect: ["https://*.berachain.com/", "https://*.berachain-staging.com/", "https://raw.githubusercontent.com/berachain/metadata/", "https://imagedelivery.net/qNj7Q3MCke89zoKzav7eDQ/", "https://*.quiknode.pro", "https://api.goldsky.com/api/public/project_clq1h5ct0g4a201x18tfte5iv/subgraphs/", string, string, string, string, string, string | undefined, "https://api.routescan.io/v2/network/"];
|
|
26
28
|
readonly img: ["https://imagedelivery.net/qNj7Q3MCke89zoKzav7eDQ/", "https://raw.githubusercontent.com/berachain/metadata/"];
|
|
27
29
|
};
|
|
28
30
|
readonly beranames: {
|
|
@@ -30,7 +32,7 @@ declare const modules: {
|
|
|
30
32
|
readonly img: ["https://beranames-assets-berachain.s3.eu-central-003.backblazeb2.com/"];
|
|
31
33
|
};
|
|
32
34
|
readonly swapAggregators: {
|
|
33
|
-
readonly connect: [`${string}/`, "https://open-api.openocean.finance/", "https://api.haiku.trade/", "https://api.fly.trade/", "https://api.enso.finance/"];
|
|
35
|
+
readonly connect: [`${string}/`, "https://open-api.openocean.finance/", "https://api.haiku.trade/", "https://api.fly.trade/", "https://api.enso.finance/", "https://api.enso.build/"];
|
|
34
36
|
};
|
|
35
37
|
readonly walletConnect: {
|
|
36
38
|
readonly connect: ["wss://relay.walletconnect.com/", "wss://relay.walletconnect.org/", "https://verify.walletconnect.org/v3/public-key"];
|
|
@@ -109,7 +111,18 @@ export type HeaderSourceModule = keyof typeof modules;
|
|
|
109
111
|
export interface CspOptions {
|
|
110
112
|
/** per-module toggle; all modules default to `true`, set `false` to exclude one from every directive */
|
|
111
113
|
modules?: Partial<Record<HeaderSourceModule, boolean>>;
|
|
114
|
+
/**
|
|
115
|
+
* `script-src` strategy. Omit (or pass an object) to keep the `strict-dynamic`
|
|
116
|
+
* policy — the fixed hash plus an optional per-request `nonce` and extra
|
|
117
|
+
* `sha` hashes. Pass `"disabled"` to fall back to a host-allowlist built from
|
|
118
|
+
* the `script` module sources instead.
|
|
119
|
+
*/
|
|
120
|
+
dynamicScriptCsp?: "disabled" | {
|
|
121
|
+
sha?: string[];
|
|
122
|
+
nonce?: string;
|
|
123
|
+
};
|
|
112
124
|
frameSources?: string[];
|
|
125
|
+
scriptSources?: string[];
|
|
113
126
|
fontSources?: string[];
|
|
114
127
|
pictureSources?: string[];
|
|
115
128
|
connectionSources?: string[];
|
|
@@ -123,9 +136,8 @@ export interface CspOptions {
|
|
|
123
136
|
* {@link getContentSecurityPolicy} / {@link cspMiddleware}.
|
|
124
137
|
*/
|
|
125
138
|
export declare const headerSourceModules: Record<HeaderSourceModule, HeaderSources>;
|
|
126
|
-
export declare function getContentSecurityPolicy({ isDevelopment,
|
|
139
|
+
export declare function getContentSecurityPolicy({ isDevelopment, cspReporting, dynamicScriptCsp, modules: enabledModules, ...args }: CspOptions & {
|
|
127
140
|
isDevelopment: boolean;
|
|
128
|
-
nonce: string;
|
|
129
141
|
cspReporting?: string;
|
|
130
142
|
}): string;
|
|
131
143
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header-sources.d.ts","sourceRoot":"","sources":["../../src/internal/header-sources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAgB7D;;;;GAIG;AACH,UAAU,aAAa;IACrB,kBAAkB;IAClB,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACpC,cAAc;IACd,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,gBAAgB;IAChB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,eAAe;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,gBAAgB;IAChB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,iBAAiB;IACjB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,gBAAgB;IAChB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"header-sources.d.ts","sourceRoot":"","sources":["../../src/internal/header-sources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAgB7D;;;;GAIG;AACH,UAAU,aAAa;IACrB,kBAAkB;IAClB,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACpC,cAAc;IACd,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,gBAAgB;IAChB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,eAAe;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,gBAAgB;IAChB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,iBAAiB;IACjB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,gBAAgB;IAChB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6JqC,CAAC;AAEnD,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,OAAO,CAAC;AAEtD;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,wGAAwG;IACxG,OAAO,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC,CAAC;IACvD;;;;;OAKG;IACH,gBAAgB,CAAC,EACb,UAAU,GACV;QACE,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACN,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,kBAAkB,EAAE,aAAa,CACjE,CAAC;AAEV,wBAAgB,wBAAwB,CAAC,EACvC,aAAa,EACb,YAAY,EACZ,gBAAqB,EACrB,OAAO,EAAE,cAAmB,EAC5B,GAAG,IAAI,EACR,EAAE,UAAU,GAAG;IACd,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,MAAM,CAyFT;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,EAWvC,CAAC;AAEH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,GAAG,GACJ,EAAE;IACD,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,YAAY,CAAC;IACvB,mGAAmG;IACnG,GAAG,CAAC,EAAE,UAAU,CAAC;CAClB,yBA2DA"}
|
|
@@ -127,6 +127,7 @@ var modules = {
|
|
|
127
127
|
// /api/honey/* and /api/pol/* (covered by 'self'), not direct browser
|
|
128
128
|
// requests to the upstream URLs.
|
|
129
129
|
config.pol.bribeBoostApi,
|
|
130
|
+
getUriFromLink(config.beep),
|
|
130
131
|
getUriFromLink(config.api),
|
|
131
132
|
jsonRpcUrl,
|
|
132
133
|
publicJsonRpcUrl,
|
|
@@ -155,7 +156,8 @@ var modules = {
|
|
|
155
156
|
"https://open-api.openocean.finance/",
|
|
156
157
|
"https://api.haiku.trade/",
|
|
157
158
|
"https://api.fly.trade/",
|
|
158
|
-
"https://api.enso.finance/"
|
|
159
|
+
"https://api.enso.finance/",
|
|
160
|
+
"https://api.enso.build/"
|
|
159
161
|
]
|
|
160
162
|
},
|
|
161
163
|
walletConnect: {
|
|
@@ -273,8 +275,8 @@ var modules = {
|
|
|
273
275
|
var headerSourceModules = modules;
|
|
274
276
|
function getContentSecurityPolicy({
|
|
275
277
|
isDevelopment,
|
|
276
|
-
nonce,
|
|
277
278
|
cspReporting,
|
|
279
|
+
dynamicScriptCsp = {},
|
|
278
280
|
modules: enabledModules = {},
|
|
279
281
|
...args
|
|
280
282
|
}) {
|
|
@@ -314,12 +316,21 @@ function getContentSecurityPolicy({
|
|
|
314
316
|
const mediaSources = dedupeCspSources(
|
|
315
317
|
collect("media").concat(args.mediaSources ?? [])
|
|
316
318
|
);
|
|
319
|
+
const scriptSources = dynamicScriptCsp === "disabled" ? dedupeCspSources(collect("script").concat(args.scriptSources ?? [])) : dedupeCspSources(
|
|
320
|
+
[
|
|
321
|
+
"'strict-dynamic'",
|
|
322
|
+
isDevelopment ? "'unsafe-eval'" : "",
|
|
323
|
+
"'sha256-k2HGvaYkGyYZxOwKGxgE1mr06tZEDcEXNZ5mdcldK0o='",
|
|
324
|
+
dynamicScriptCsp.nonce ? `'nonce-${dynamicScriptCsp.nonce}'` : "",
|
|
325
|
+
...dynamicScriptCsp.sha ?? []
|
|
326
|
+
].filter((source) => source !== "")
|
|
327
|
+
);
|
|
317
328
|
let cspHeader = `
|
|
318
329
|
default-src 'self' ${defaultSrc.join(" ")};
|
|
319
330
|
base-uri 'self';
|
|
320
331
|
frame-src 'self' ${frameSources.join(" ")};
|
|
321
332
|
frame-ancestors 'self' https://*.posthog.com;
|
|
322
|
-
script-src 'self'
|
|
333
|
+
script-src 'self' ${scriptSources.join(" ")};
|
|
323
334
|
worker-src 'self' blob: data: ${workerSources.join(" ")};
|
|
324
335
|
font-src 'self' ${fontSources.join(" ")};
|
|
325
336
|
style-src 'self' ${styleSources.join(" ")} 'unsafe-inline';
|
|
@@ -352,16 +363,19 @@ function cspMiddleware({
|
|
|
352
363
|
csp
|
|
353
364
|
}) {
|
|
354
365
|
const sentryCspEndpoint = getSentryKeys()?.cspEndpoint;
|
|
355
|
-
const nonce = Buffer.from(crypto.randomUUID()).toString("base64");
|
|
366
|
+
const nonce = csp?.dynamicScriptCsp !== "disabled" ? csp?.dynamicScriptCsp?.nonce ?? Buffer.from(crypto.randomUUID()).toString("base64") : void 0;
|
|
356
367
|
const isDevelopment = process.env.NODE_ENV === "development";
|
|
357
368
|
const headers = [
|
|
358
369
|
{
|
|
359
370
|
key: "Content-Security-Policy",
|
|
360
371
|
value: getContentSecurityPolicy({
|
|
361
372
|
...csp,
|
|
373
|
+
dynamicScriptCsp: csp?.dynamicScriptCsp === "disabled" ? csp.dynamicScriptCsp : {
|
|
374
|
+
...csp?.dynamicScriptCsp,
|
|
375
|
+
nonce
|
|
376
|
+
},
|
|
362
377
|
isDevelopment,
|
|
363
|
-
cspReporting: sentryCspEndpoint?.toString()
|
|
364
|
-
nonce
|
|
378
|
+
cspReporting: sentryCspEndpoint?.toString()
|
|
365
379
|
})
|
|
366
380
|
},
|
|
367
381
|
{
|
|
@@ -388,6 +402,9 @@ function cspMiddleware({
|
|
|
388
402
|
});
|
|
389
403
|
}
|
|
390
404
|
for (const header of headers) {
|
|
405
|
+
if (!header.value) {
|
|
406
|
+
continue;
|
|
407
|
+
}
|
|
391
408
|
response.headers.set(header.key, header.value);
|
|
392
409
|
}
|
|
393
410
|
return response;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../../../src/internal/nextjs/const.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEvC,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAC7C,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,
|
|
1
|
+
{"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../../../src/internal/nextjs/const.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEvC,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAC7C,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,CA2EpD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk2JZ7QJEWcjs = require('../../chunk-2JZ7QJEW.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkSHM2VD4Acjs = require('../../chunk-SHM2VD4A.cjs');
|
|
@@ -53,7 +53,7 @@ function withBeraConfig(config, {
|
|
|
53
53
|
...config,
|
|
54
54
|
images: {
|
|
55
55
|
...config.images,
|
|
56
|
-
remotePatterns: [...
|
|
56
|
+
remotePatterns: [..._chunk2JZ7QJEWcjs.IMAGE_REMOTE_PATTERNS]
|
|
57
57
|
},
|
|
58
58
|
async rewrites() {
|
|
59
59
|
if (!withPostHogReverseProxy) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk2JZ7QJEWcjs = require('../../../chunk-2JZ7QJEW.cjs');
|
|
4
4
|
|
|
5
5
|
// src/internal/nextjs/utils/index.ts
|
|
6
6
|
function globToRegExp(glob) {
|
|
@@ -19,7 +19,7 @@ function isAllowedImageUrl(urlString) {
|
|
|
19
19
|
try {
|
|
20
20
|
if (!urlString) return false;
|
|
21
21
|
const url = new URL(urlString);
|
|
22
|
-
for (const pattern of
|
|
22
|
+
for (const pattern of _chunk2JZ7QJEWcjs.IMAGE_REMOTE_PATTERNS) {
|
|
23
23
|
if (pattern.protocol && url.protocol.replace(":", "") !== pattern.protocol)
|
|
24
24
|
continue;
|
|
25
25
|
if (normalizeHostname(url.hostname) !== normalizeHostname(pattern.hostname))
|