Unverified Commit 9fac077c authored by Jiwon Choi's avatar Jiwon Choi Committed by GitHub

fix: metadata image route normalize path posix for windows (#71673)

### 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 #71615.

Fixes #71582
parent c1cfee3e
...@@ -76,6 +76,8 @@ async function getStaticAssetRouteCode( ...@@ -76,6 +76,8 @@ async function getStaticAssetRouteCode(
resourcePath: string, resourcePath: string,
fileBaseName: string fileBaseName: string
) { ) {
resourcePath = path.posix.normalize(resourcePath)
const cache = const cache =
fileBaseName === 'favicon' fileBaseName === 'favicon'
? 'public, max-age=0, must-revalidate' ? 'public, max-age=0, must-revalidate'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment