mirror of
https://github.com/withastro/astro.git
synced 2025-03-17 23:11:29 -05:00
fix: dev redirect needs to ignore base default of ./
This commit is contained in:
parent
a9132217eb
commit
49934fa565
1 changed files with 2 additions and 1 deletions
|
@ -112,7 +112,8 @@ async function handle404Response(
|
|||
html = subpathNotUsedTemplate(devRoot, pathname);
|
||||
} else {
|
||||
// HACK: redirect without the base path for assets in publicDir
|
||||
if (config.base && !pathname.startsWith(config.base)) {
|
||||
if (config.base && config.base !== './' && !pathname.startsWith(config.base)) {
|
||||
console.log('REDIRECT::', pathname, config.base, pathname.replace(config.base, ''));
|
||||
const response = new Response(null, {
|
||||
status: 301,
|
||||
headers: {
|
||||
|
|
Loading…
Add table
Reference in a new issue