feat: Installable PWA (#1882)

This commit is contained in:
Tom Moor
2021-02-15 15:19:51 -08:00
committed by GitHub
parent 4b603460cb
commit 7e922d8716
22 changed files with 1093 additions and 75 deletions

View File

@ -67,6 +67,8 @@ router.get("/_health", (ctx) => (ctx.body = "OK"));
if (process.env.NODE_ENV === "production") {
router.get("/static/*", async (ctx) => {
ctx.set({
"Service-Worker-Allowed": "/",
"Access-Control-Allow-Origin": "*",
"Cache-Control": `max-age=${356 * 24 * 60 * 60}`,
});