Skip to content

Commit

Permalink
fix: metadata image route normalize path posix for windows (vercel#71673
Browse files Browse the repository at this point in the history
)

### Why?

When handling the opengraph-image size exceeding the limit, we mapped
with string literal between Rust and JavaScript. The Rust string literal
contains backslashes `\` on Windows, incompatible with JavaScript string
syntax.

Following up on vercel#71615.

Fixes vercel#71582
  • Loading branch information
devjiwonchoi authored and sebmarkbage committed Oct 23, 2024
1 parent 085d63a commit 67ad72b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ async function getStaticAssetRouteCode(
resourcePath: string,
fileBaseName: string
) {
resourcePath = path.posix.normalize(resourcePath)

const cache =
fileBaseName === 'favicon'
? 'public, max-age=0, must-revalidate'
Expand Down

0 comments on commit 67ad72b

Please sign in to comment.