test service workers
This commit is contained in:
parent
26ee205c25
commit
0b9d1bf7fb
4 changed files with 129 additions and 1 deletions
7
app.js
7
app.js
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue