Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,12 @@ ENUM must be equal to one of the allowed values

exports[`route headers > should throw on invalid pattern format 1`] = `
[ManifestValidationError: Validation of Edge Functions manifest failed
FORMAT must match format "regexPattern"
TYPE must be string

15 | "x-custom-header": {
16 | "matcher": "regex",
> 17 | "pattern": "/^Bearer .+/"
| ^^^^^^^^^^^^^^ 👈🏽 format must match format "regexPattern"
> 17 | "pattern": {}
| ^^ 👈🏽 type must be string
18 | }
19 | }
20 | }]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ describe('route headers', () => {
manifest.routes[0].headers = {
'x-custom-header': {
matcher: 'regex',
pattern: '^Bearer .+$',
pattern: 'Bearer .+',
},
}

Expand Down Expand Up @@ -254,7 +254,7 @@ describe('route headers', () => {
manifest.routes[0].headers = {
'x-custom-header': {
matcher: 'regex',
pattern: '/^Bearer .+/',
pattern: /^Bearer .+/,
},
}

Expand Down
1 change: 0 additions & 1 deletion packages/edge-bundler/node/validation/manifest/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const headersSchema = {
properties: {
pattern: {
type: 'string',
format: 'regexPattern',
},
matcher: {
type: 'string',
Expand Down
Loading