@netlify/edge-bundler 14.2.1 → 14.2.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.
package/dist/node/declaration.js
CHANGED
|
@@ -133,7 +133,9 @@ export const getHeaderMatchers = (headers) => {
|
|
|
133
133
|
matchers[header] = { matcher: headers[header] ? 'exists' : 'missing' };
|
|
134
134
|
}
|
|
135
135
|
else if (typeof headers[header] === 'string') {
|
|
136
|
-
|
|
136
|
+
// Strip leading and forward slashes.
|
|
137
|
+
const pattern = new RegExp(headers[header]).toString().slice(1, -1);
|
|
138
|
+
matchers[header] = { matcher: 'regex', pattern };
|
|
137
139
|
}
|
|
138
140
|
else {
|
|
139
141
|
throw new BundleError(new Error(headerConfigError));
|
|
@@ -551,9 +551,9 @@ describe('Header matching', () => {
|
|
|
551
551
|
'x-present': true,
|
|
552
552
|
'x-also-present': true,
|
|
553
553
|
'x-absent': false,
|
|
554
|
-
'x-match-prefix': '^prefix
|
|
555
|
-
'x-match-exact': 'exact',
|
|
556
|
-
'x-match-suffix': '
|
|
554
|
+
'x-match-prefix': '^prefix',
|
|
555
|
+
'x-match-exact': '^exact$',
|
|
556
|
+
'x-match-suffix': 'suffix$',
|
|
557
557
|
},
|
|
558
558
|
},
|
|
559
559
|
];
|
|
@@ -580,11 +580,11 @@ describe('Header matching', () => {
|
|
|
580
580
|
matcher: 'regex',
|
|
581
581
|
},
|
|
582
582
|
'x-match-prefix': {
|
|
583
|
-
pattern: '^prefix
|
|
583
|
+
pattern: '^prefix',
|
|
584
584
|
matcher: 'regex',
|
|
585
585
|
},
|
|
586
586
|
'x-match-suffix': {
|
|
587
|
-
pattern: '
|
|
587
|
+
pattern: 'suffix$',
|
|
588
588
|
matcher: 'regex',
|
|
589
589
|
},
|
|
590
590
|
'x-present': {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/edge-bundler",
|
|
3
|
-
"version": "14.2.
|
|
3
|
+
"version": "14.2.2",
|
|
4
4
|
"description": "Intelligently prepare Netlify Edge Functions for deployment",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/node/index.js",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"urlpattern-polyfill": "8.0.2",
|
|
82
82
|
"uuid": "^11.0.0"
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "8b7583e1890636bd64b54e20aee40ae5365edeaf"
|
|
85
85
|
}
|