mirror of
https://github.com/Unkn0wnCat/KevinK.dev.js.git
synced 2025-04-30 10:46:57 +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);
|
||||
|
||||
config.languages.forEach((language) => {
|
||||
if(requestURL.pathname.startsWith("/"+language+"/")) {
|
||||
for (let i = 0; i < config.languages.length; i++) {
|
||||
const language = config.languages[i];
|
||||
|
||||
if(requestURL.pathname.startsWith("/"+language)) {
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
let headers = request.headers;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue