Fix infinite loop

This commit is contained in:
Kevin Kandlbinder 2020-12-23 01:53:33 +01:00
parent d1493d00c1
commit a3c41b6267

View file

@ -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;