mirror of
https://github.com/Unkn0wnCat/KevinK.dev.js.git
synced 2025-04-30 18:57:20 +02:00
Fix response creation
This commit is contained in:
parent
c7e3c22cff
commit
d1493d00c1
1 changed files with 8 additions and 1 deletions
|
@ -33,6 +33,13 @@ async function checkLang({ request }) {
|
||||||
|
|
||||||
requestURL.pathname = "/"+selectedLanguage+requestURL.pathname;
|
requestURL.pathname = "/"+selectedLanguage+requestURL.pathname;
|
||||||
|
|
||||||
return Response.redirect(requestURL.toString(), 302);
|
///return Response.redirect(requestURL.toString(), 302);
|
||||||
|
|
||||||
|
return new Response(null, {
|
||||||
|
status: 302,
|
||||||
|
headers: {
|
||||||
|
Location: requestURL.toString(),
|
||||||
|
},
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue