@berachain/config 0.1.25 → 0.1.26-beta.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.
- 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 +20 -5
- package/dist/internal/header-sources.d.ts +15 -3
- package/dist/internal/header-sources.d.ts.map +1 -1
- package/dist/internal/header-sources.mjs +20 -5
- package/dist/internal/nextjs/const.d.ts.map +1 -1
- package/dist/internal/nextjs/index.cjs +5 -5
- package/dist/internal/nextjs/index.mjs +4 -4
- 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,
|
|
@@ -274,8 +275,8 @@ var modules = {
|
|
|
274
275
|
var headerSourceModules = modules;
|
|
275
276
|
function getContentSecurityPolicy({
|
|
276
277
|
isDevelopment,
|
|
277
|
-
nonce,
|
|
278
278
|
cspReporting,
|
|
279
|
+
dynamicScriptCsp = {},
|
|
279
280
|
modules: enabledModules = {},
|
|
280
281
|
...args
|
|
281
282
|
}) {
|
|
@@ -315,12 +316,20 @@ function getContentSecurityPolicy({
|
|
|
315
316
|
const mediaSources = dedupeCspSources(
|
|
316
317
|
collect("media").concat(_nullishCoalesce(args.mediaSources, () => ( [])))
|
|
317
318
|
);
|
|
319
|
+
const scriptSources = dynamicScriptCsp === "disabled" ? dedupeCspSources(collect("script").concat(_nullishCoalesce(args.scriptSources, () => ( [])))) : dedupeCspSources(
|
|
320
|
+
[
|
|
321
|
+
dynamicScriptCsp.nonce ? `'nonce-${dynamicScriptCsp.nonce}'` : "",
|
|
322
|
+
"'strict-dynamic'",
|
|
323
|
+
"'sha256-k2HGvaYkGyYZxOwKGxgE1mr06tZEDcEXNZ5mdcldK0o='",
|
|
324
|
+
..._nullishCoalesce(dynamicScriptCsp.sha, () => ( []))
|
|
325
|
+
].filter((source) => source !== "")
|
|
326
|
+
);
|
|
318
327
|
let cspHeader = `
|
|
319
328
|
default-src 'self' ${defaultSrc.join(" ")};
|
|
320
329
|
base-uri 'self';
|
|
321
330
|
frame-src 'self' ${frameSources.join(" ")};
|
|
322
331
|
frame-ancestors 'self' https://*.posthog.com;
|
|
323
|
-
script-src 'self'
|
|
332
|
+
script-src 'self' ${scriptSources.concat([isDevelopment ? "'unsafe-eval'" : ""]).join(" ")};
|
|
324
333
|
worker-src 'self' blob: data: ${workerSources.join(" ")};
|
|
325
334
|
font-src 'self' ${fontSources.join(" ")};
|
|
326
335
|
style-src 'self' ${styleSources.join(" ")} 'unsafe-inline';
|
|
@@ -353,16 +362,19 @@ function cspMiddleware({
|
|
|
353
362
|
csp
|
|
354
363
|
}) {
|
|
355
364
|
const sentryCspEndpoint = _optionalChain([getSentryKeys, 'call', _5 => _5(), 'optionalAccess', _6 => _6.cspEndpoint]);
|
|
356
|
-
const nonce = Buffer.from(crypto.randomUUID()).toString("base64");
|
|
365
|
+
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;
|
|
357
366
|
const isDevelopment = process.env.NODE_ENV === "development";
|
|
358
367
|
const headers = [
|
|
359
368
|
{
|
|
360
369
|
key: "Content-Security-Policy",
|
|
361
370
|
value: getContentSecurityPolicy({
|
|
362
371
|
...csp,
|
|
372
|
+
dynamicScriptCsp: _optionalChain([csp, 'optionalAccess', _10 => _10.dynamicScriptCsp]) === "disabled" ? csp.dynamicScriptCsp : {
|
|
373
|
+
..._optionalChain([csp, 'optionalAccess', _11 => _11.dynamicScriptCsp]),
|
|
374
|
+
nonce
|
|
375
|
+
},
|
|
363
376
|
isDevelopment,
|
|
364
|
-
cspReporting: _optionalChain([sentryCspEndpoint, 'optionalAccess',
|
|
365
|
-
nonce
|
|
377
|
+
cspReporting: _optionalChain([sentryCspEndpoint, 'optionalAccess', _12 => _12.toString, 'call', _13 => _13()])
|
|
366
378
|
})
|
|
367
379
|
},
|
|
368
380
|
{
|
|
@@ -389,6 +401,9 @@ function cspMiddleware({
|
|
|
389
401
|
});
|
|
390
402
|
}
|
|
391
403
|
for (const header of headers) {
|
|
404
|
+
if (!header.value) {
|
|
405
|
+
continue;
|
|
406
|
+
}
|
|
392
407
|
response.headers.set(header.key, header.value);
|
|
393
408
|
}
|
|
394
409
|
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: {
|
|
@@ -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,CA0FT;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,
|
|
@@ -274,8 +275,8 @@ var modules = {
|
|
|
274
275
|
var headerSourceModules = modules;
|
|
275
276
|
function getContentSecurityPolicy({
|
|
276
277
|
isDevelopment,
|
|
277
|
-
nonce,
|
|
278
278
|
cspReporting,
|
|
279
|
+
dynamicScriptCsp = {},
|
|
279
280
|
modules: enabledModules = {},
|
|
280
281
|
...args
|
|
281
282
|
}) {
|
|
@@ -315,12 +316,20 @@ function getContentSecurityPolicy({
|
|
|
315
316
|
const mediaSources = dedupeCspSources(
|
|
316
317
|
collect("media").concat(args.mediaSources ?? [])
|
|
317
318
|
);
|
|
319
|
+
const scriptSources = dynamicScriptCsp === "disabled" ? dedupeCspSources(collect("script").concat(args.scriptSources ?? [])) : dedupeCspSources(
|
|
320
|
+
[
|
|
321
|
+
dynamicScriptCsp.nonce ? `'nonce-${dynamicScriptCsp.nonce}'` : "",
|
|
322
|
+
"'strict-dynamic'",
|
|
323
|
+
"'sha256-k2HGvaYkGyYZxOwKGxgE1mr06tZEDcEXNZ5mdcldK0o='",
|
|
324
|
+
...dynamicScriptCsp.sha ?? []
|
|
325
|
+
].filter((source) => source !== "")
|
|
326
|
+
);
|
|
318
327
|
let cspHeader = `
|
|
319
328
|
default-src 'self' ${defaultSrc.join(" ")};
|
|
320
329
|
base-uri 'self';
|
|
321
330
|
frame-src 'self' ${frameSources.join(" ")};
|
|
322
331
|
frame-ancestors 'self' https://*.posthog.com;
|
|
323
|
-
script-src 'self'
|
|
332
|
+
script-src 'self' ${scriptSources.concat([isDevelopment ? "'unsafe-eval'" : ""]).join(" ")};
|
|
324
333
|
worker-src 'self' blob: data: ${workerSources.join(" ")};
|
|
325
334
|
font-src 'self' ${fontSources.join(" ")};
|
|
326
335
|
style-src 'self' ${styleSources.join(" ")} 'unsafe-inline';
|
|
@@ -353,16 +362,19 @@ function cspMiddleware({
|
|
|
353
362
|
csp
|
|
354
363
|
}) {
|
|
355
364
|
const sentryCspEndpoint = getSentryKeys()?.cspEndpoint;
|
|
356
|
-
const nonce = Buffer.from(crypto.randomUUID()).toString("base64");
|
|
365
|
+
const nonce = csp?.dynamicScriptCsp !== "disabled" ? csp?.dynamicScriptCsp?.nonce ?? Buffer.from(crypto.randomUUID()).toString("base64") : void 0;
|
|
357
366
|
const isDevelopment = process.env.NODE_ENV === "development";
|
|
358
367
|
const headers = [
|
|
359
368
|
{
|
|
360
369
|
key: "Content-Security-Policy",
|
|
361
370
|
value: getContentSecurityPolicy({
|
|
362
371
|
...csp,
|
|
372
|
+
dynamicScriptCsp: csp?.dynamicScriptCsp === "disabled" ? csp.dynamicScriptCsp : {
|
|
373
|
+
...csp?.dynamicScriptCsp,
|
|
374
|
+
nonce
|
|
375
|
+
},
|
|
363
376
|
isDevelopment,
|
|
364
|
-
cspReporting: sentryCspEndpoint?.toString()
|
|
365
|
-
nonce
|
|
377
|
+
cspReporting: sentryCspEndpoint?.toString()
|
|
366
378
|
})
|
|
367
379
|
},
|
|
368
380
|
{
|
|
@@ -389,6 +401,9 @@ function cspMiddleware({
|
|
|
389
401
|
});
|
|
390
402
|
}
|
|
391
403
|
for (const header of headers) {
|
|
404
|
+
if (!header.value) {
|
|
405
|
+
continue;
|
|
406
|
+
}
|
|
392
407
|
response.headers.set(header.key, header.value);
|
|
393
408
|
}
|
|
394
409
|
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,9 @@
|
|
|
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 _chunkZTYHPIUWcjs = require('../../chunk-ZTYHPIUW.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunk2JZ7QJEWcjs = require('../../chunk-2JZ7QJEW.cjs');
|
|
4
7
|
|
|
5
8
|
|
|
6
9
|
var _chunkSHM2VD4Acjs = require('../../chunk-SHM2VD4A.cjs');
|
|
@@ -9,9 +12,6 @@ require('../../chunk-ZJEZCW5Z.cjs');
|
|
|
9
12
|
require('../../chunk-AU3LYJAB.cjs');
|
|
10
13
|
require('../../chunk-EYYJ2UZT.cjs');
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
var _chunkZTYHPIUWcjs = require('../../chunk-ZTYHPIUW.cjs');
|
|
14
|
-
|
|
15
15
|
// src/internal/nextjs/index.ts
|
|
16
16
|
var _dotenv = require('dotenv'); var _dotenv2 = _interopRequireDefault(_dotenv);
|
|
17
17
|
_dotenv2.default.config({ path: ["../../.env.local", "../../.env"] });
|
|
@@ -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,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
withSentryConfig
|
|
3
|
+
} from "../../chunk-XA5DMTFW.mjs";
|
|
1
4
|
import {
|
|
2
5
|
IMAGE_REMOTE_PATTERNS
|
|
3
|
-
} from "../../chunk-
|
|
6
|
+
} from "../../chunk-AP2XG6GJ.mjs";
|
|
4
7
|
import {
|
|
5
8
|
appConfig
|
|
6
9
|
} from "../../chunk-IGYS2XEK.mjs";
|
|
@@ -8,9 +11,6 @@ import "../../chunk-KPZI7IXR.mjs";
|
|
|
8
11
|
import "../../chunk-5SH7AT43.mjs";
|
|
9
12
|
import "../../chunk-VWRKCGMU.mjs";
|
|
10
13
|
import "../../chunk-KJXYSGNH.mjs";
|
|
11
|
-
import {
|
|
12
|
-
withSentryConfig
|
|
13
|
-
} from "../../chunk-XA5DMTFW.mjs";
|
|
14
14
|
|
|
15
15
|
// src/internal/nextjs/index.ts
|
|
16
16
|
import dotenv from "dotenv";
|
|
@@ -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))
|