Skip to content

Commit

Permalink
fix(validator): Add double quotation marks to multipart checker regex (
Browse files Browse the repository at this point in the history
  • Loading branch information
CPlusPatch committed Jul 28, 2024
1 parent a63bcfd commit 0417830
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/validator/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export type ValidationFunction<
type ExcludeResponseType<T> = T extends Response & TypedResponse<any> ? never : T

const jsonRegex = /^application\/([a-z-\.]+\+)?json$/
const multipartRegex = /^multipart\/form-data(; boundary=[A-Za-z0-9'()+_,\-./:=?]+)?$/
const multipartRegex = /^multipart\/form-data(; boundary=[A-Za-z0-9'"()+_,\-./:=?]+)?$/
const urlencodedRegex = /^application\/x-www-form-urlencoded$/

export const validator = <
Expand Down

0 comments on commit 0417830

Please sign in to comment.