Exclude sw.js from redirector

This commit is contained in:
Kevin Kandlbinder 2020-12-23 15:53:39 +01:00
parent ed31fab998
commit 4fef22a30a

View file

@ -13,7 +13,12 @@ async function checkLang({ request }) {
let requestURL = new URL(url);
if(requestURL.pathname.startsWith("/assets") || requestURL.pathname.startsWith("/icons") || requestURL.pathname.startsWith("/manifest.webmanifest") || requestURL.pathname.startsWith("/favicon")) {
if(requestURL.pathname.startsWith("/assets") ||
requestURL.pathname.startsWith("/icons") ||
requestURL.pathname.startsWith("/manifest.webmanifest") ||
requestURL.pathname.startsWith("/favicon") ||
requestURL.pathname.startsWith("/sw.js")) {
return;
}