0
0
mirror of https://github.com/honojs/hono.git synced 2024-11-24 19:26:56 +01:00

fix(validator): Add double quotation marks to multipart checker regex (#3195)

This commit is contained in:
Gaspard Wierzbinski 2024-07-28 09:22:52 +02:00 committed by GitHub
parent a63bcfd6fb
commit 0417830fe9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 = <