mirror of
https://github.com/Unkn0wnCat/KevinK.dev.js.git
synced 2025-06-16 09:32:03 +02:00
Fix infinite loop
This commit is contained in:
parent
d1493d00c1
commit
a3c41b6267
1 changed files with 5 additions and 3 deletions
|
@ -13,11 +13,13 @@ async function checkLang({ request }) {
|
||||||
|
|
||||||
let requestURL = new URL(url);
|
let requestURL = new URL(url);
|
||||||
|
|
||||||
config.languages.forEach((language) => {
|
for (let i = 0; i < config.languages.length; i++) {
|
||||||
if(requestURL.pathname.startsWith("/"+language+"/")) {
|
const language = config.languages[i];
|
||||||
|
|
||||||
|
if(requestURL.pathname.startsWith("/"+language)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
let headers = request.headers;
|
let headers = request.headers;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue