File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1578,6 +1578,18 @@ export default abstract class Server<ServerOptions extends Options = Options> {
15781578 if ( result !== false ) return result
15791579 }
15801580 }
1581+
1582+ // currently edge functions aren't receiving the x-matched-path
1583+ // header so we need to fallback to matching the current page
1584+ // when we weren't able to match via dynamic route to handle
1585+ // the rewrite case
1586+ // @ts -expect-error extended in child class web-server
1587+ if ( this . serverOptions . webServerConfig ) {
1588+ // @ts -expect-error extended in child class web-server
1589+ ctx . pathname = this . serverOptions . webServerConfig . page
1590+ const result = await this . renderPageComponent ( ctx , bubbleNoFallback )
1591+ if ( result !== false ) return result
1592+ }
15811593 } catch ( error ) {
15821594 const err = getProperError ( error )
15831595
You can’t perform that action at this time.
0 commit comments