Skip to content
Myr

fix: add missing tail to svg regex (#1788)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Elias Brange · committed by GitHub · parent 477e763 · Browse files · 4 files+6 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+6 added−2 removed

  • tests:+4 added−0 removed
  • other:+2 added−2 removed

4 files+6 added−2 removed

modified:src/adapter/aws-lambda/handler.test.ts+2 added
modified:src/adapter/aws-lambda/handler.ts+1 added-1 removed
259 unmodified lines
260 return Object.prototype.hasOwnProperty.call(event, 'rawPath')261}262263export const isContentTypeBinary = (contentType: string) => {264 return !/^(text\/(plain|html|css|javascript|csv).*|application\/(.*json|.*xml).*|image\/svg\+xml)$/.test(264 return !/^(text\/(plain|html|css|javascript|csv).*|application\/(.*json|.*xml).*|image\/svg\+xml.*)$/.test(265 contentType266 )267}268
6 unmodified lines
modified:src/adapter/lambda-edge/handler.test.ts+2 added
modified:src/adapter/lambda-edge/handler.ts+1 added-1 removed
156 unmodified lines
157 })158}159160export const isContentTypeBinary = (contentType: string) => {161 return !/^(text\/(plain|html|css|javascript|csv).*|application\/(.*json|.*xml).*|image\/svg\+xml)$/.test(161 return !/^(text\/(plain|html|css|javascript|csv).*|application\/(.*json|.*xml).*|image\/svg\+xml.*)$/.test(162 contentType163 )164}