Skip to content

Commit

Permalink
Try fix redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
brachkow committed May 9, 2024
1 parent ced85c0 commit b71c287
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions/_middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export async function onRequest(context) {
const { pathname } = new URL(request.url);

if (pathname.startsWith('/api/')) {
return new Response.redirect('http://example.com', '304');
return res.redirect('http://example.com', '304');
}

return res;
Expand Down

0 comments on commit b71c287

Please sign in to comment.