1
0
mirror of https://github.com/osmarks/website synced 2025-09-03 03:07:56 +00:00

Infipage update

This commit is contained in:
2020-03-15 18:28:44 +00:00
parent ccd4f72d2d
commit 62eca4af08
2 changed files with 21 additions and 121 deletions

View File

@@ -41,7 +41,8 @@ const ignorePaths = [
const shouldRespond = req => {
if (req.method !== "GET") { return false } // do not respond to non-GET requests
if (!req.url.startsWith(self.location.origin)) { return false } // do not respond to cross-origin requests
const path = new URL(req.url).pathname
const parsedURL = new URL(req.url)
const path = parsedURL.pathname
for (ignorePath of ignorePaths) {
if (path.startsWith(ignorePath)) { return false }
}