mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
Fixes edge middleware calling nested routes (#10215)
This commit is contained in:
parent
459f74bc71
commit
a013182d32
2 changed files with 6 additions and 1 deletions
5
.changeset/popular-turtles-sort.md
Normal file
5
.changeset/popular-turtles-sort.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@astrojs/vercel": patch
|
||||
---
|
||||
|
||||
Fixes edge middleware calling nested routes
|
|
@ -90,7 +90,7 @@ export default async function middleware(request, context) {
|
|||
ctx.locals = ${handlerTemplateCall};
|
||||
const { origin } = new URL(request.url);
|
||||
const next = () =>
|
||||
fetch(new URL('${NODE_PATH}', request.url), {
|
||||
fetch(new URL('/${NODE_PATH}', request.url), {
|
||||
headers: {
|
||||
...Object.fromEntries(request.headers.entries()),
|
||||
'${ASTRO_MIDDLEWARE_SECRET_HEADER}': '${middlewareSecret}',
|
||||
|
|
Loading…
Reference in a new issue