test service workers

This commit is contained in:
Stewart Allen 2022-08-31 16:35:25 -04:00
commit 0b9d1bf7fb
4 changed files with 129 additions and 1 deletions

7
app.js
View file

@ -417,6 +417,12 @@ const script = {
],
mesh_pool : [
"&mesh/pool"
],
cache : [
"main/service",
],
service : [
"moto/service"
]
};
@ -474,6 +480,7 @@ function handleOptions(req, res, next) {
} catch (e) {
logger.log("ua parse error on : "+req.headers['user-agent']);
}
res.setHeader("Service-Worker-Allowed", "/");
if (req.method === 'OPTIONS') {
addCorsHeaders(req, res);
res.end();