0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-06 22:10:10 -05:00

fix(underscore-redirects): fix dynamic pattern regression (#8979)

This commit is contained in:
Alexander Niebuhr 2023-11-01 20:51:15 +01:00 committed by GitHub
parent ea16b45c0d
commit 0ee7c9aac9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -0,0 +1,5 @@
---
'@astrojs/underscore-redirects': patch
---
Fixes a regression which used the wrong pattern for dynamic pages

View file

@ -100,7 +100,7 @@ export function createRedirectsFromAstroRoutes({
}
_redirects.add({
dynamic: true,
input: `${base}${route.pattern}`,
input: `${base}${pattern}`,
target,
status: route.type === 'redirect' ? 301 : 200,
weight: 1,
@ -108,7 +108,7 @@ export function createRedirectsFromAstroRoutes({
} else {
_redirects.add({
dynamic: true,
input: `${base}${route.pattern}`,
input: `${base}${pattern}`,
target: dynamicTarget,
status: 200,
weight: 1,