File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ export const handle = async (req: Request, res: Response) => {
1515 const locale = req . query . locale || "" ;
1616 if ( typeof locale !== "string" ) return res . sendStatus ( 404 ) ;
1717 if ( ! LOCALE_FORMATS . some ( it => locale . match ( it ) ) ) return res . sendStatus ( 404 ) ;
18- const serveFrom = ` ./dist/hosting/browser/ ${ locale } ` ;
19- const normalizedPath = normalize ( join ( serveFrom , src ) ) ;
18+ const serveFrom = " ./dist/hosting/browser" ;
19+ const normalizedPath = normalize ( join ( serveFrom , locale , src ) ) ;
2020 if ( relative ( serveFrom , normalizedPath ) . startsWith ( ".." ) ) return res . sendStatus ( 404 ) ;
2121 const { default : sharp } = await import ( "sharp" ) ;
2222 const width = typeof req . query . width === "string" ? parseInt ( req . query . width ) : undefined ;
You can’t perform that action at this time.
0 commit comments