Mostly so that it's easier to cut the next patch release for Fresh.
This reverts commit e3508c3054.
This commit is contained in:
@@ -12,7 +12,11 @@ export async function handler(
|
||||
// Redirect from old doc URLs to new ones
|
||||
const redirect = REDIRECTS[ctx.url.pathname];
|
||||
if (redirect) {
|
||||
return ctx.redirect(redirect, 307);
|
||||
const url = new URL(redirect, ctx.url.origin);
|
||||
return new Response("", {
|
||||
status: 307,
|
||||
headers: { location: url.href },
|
||||
});
|
||||
}
|
||||
|
||||
return await ctx.next();
|
||||
|
||||
Reference in New Issue
Block a user