]> Untitled Git - lemmy-ui.git/commitdiff
Trying to fix manifest csp.
authorDessalines <tyhou13@gmx.com>
Sun, 24 Jan 2021 18:52:52 +0000 (13:52 -0500)
committerDessalines <tyhou13@gmx.com>
Sun, 24 Jan 2021 18:52:52 +0000 (13:52 -0500)
package.json
src/server/index.tsx
src/service-worker.ts
yarn.lock

index ff63a80ac2f308afb23d82cff485f790b668200e..d51344c925833e495b51a01bc3196d782e497117 100644 (file)
@@ -67,7 +67,7 @@
     "eslint": "^7.18.0",
     "eslint-plugin-jane": "^9.0.6",
     "husky": "^4.3.8",
-    "lemmy-js-client": "0.9.0-rc.16",
+    "lemmy-js-client": "0.9.0-rc.18",
     "lint-staged": "^10.5.3",
     "mini-css-extract-plugin": "^1.3.4",
     "node-fetch": "^2.6.1",
index 10e935d902415e6deb66565da34447ad4dfc3ec4..21b3d053015c0afd19a4d87c3923ac582d3f7394 100644 (file)
@@ -87,7 +87,7 @@ server.get('/*', async (req, res) => {
   const cspHtml = (
     <meta
       http-equiv="Content-Security-Policy"
-      content="default-src data:; connect-src * ws: wss:; frame-src *; img-src * data:; script-src 'self'; style-src 'self' 'unsafe-inline'"
+      content="default-src data: 'self'; connect-src * ws: wss:; frame-src *; img-src * data:; script-src 'self'; style-src 'self' 'unsafe-inline'; manifest-src 'self'"
     />
   );
 
index ca9fe2112607b0d6b4e2fe9b698ea2c22a613ae1..a7e1bd523bf1feed54f0730750bed13d13842c48 100644 (file)
@@ -2,21 +2,21 @@ import { register } from 'register-service-worker';
 
 register('/service-worker.js', {
   registrationOptions: { scope: './' },
-  // ready(registration) {
-  //   console.log('Service worker is active.');
-  // },
-  // registered(registration) {
-  //   console.log('Service worker has been registered.');
-  // },
-  // cached(registration) {
-  //   console.log('Content has been cached for offline use.');
-  // },
-  // updatefound(registration) {
-  //   console.log('New content is downloading.');
-  // },
-  // updated(registration) {
-  //   console.log('New content is available; please refresh.');
-  // },
+  ready(registration) {
+    console.log('Service worker is active.');
+  },
+  registered(registration) {
+    console.log('Service worker has been registered.');
+  },
+  cached(registration) {
+    console.log('Content has been cached for offline use.');
+  },
+  updatefound(registration) {
+    console.log('New content is downloading.');
+  },
+  updated(registration) {
+    console.log('New content is available; please refresh.');
+  },
   offline() {
     console.log(
       'No internet connection found. App is running in offline mode.'
index 90912bb134b669c8393d936b5e0b72430a867011..382f179bd464d91da7ffb447f0f602e5b9b22ef0 100644 (file)
--- a/yarn.lock
+++ b/yarn.lock
@@ -5629,10 +5629,10 @@ lcid@^1.0.0:
   dependencies:
     invert-kv "^1.0.0"
 
-lemmy-js-client@0.9.0-rc.16:
-  version "0.9.0-rc.16"
-  resolved "https://registry.yarnpkg.com/lemmy-js-client/-/lemmy-js-client-0.9.0-rc.16.tgz#4cb01bee5821d05f477857877879a7a7e1711cce"
-  integrity sha512-x5LRpXtUFDSMLqcNY/r6mttc4rrzedyfcQdudStPJlZaX4L8FSfBa3A1T8I1m4/UaVeIIXZjV2dl306LaQqOvw==
+lemmy-js-client@0.9.0-rc.18:
+  version "0.9.0-rc.18"
+  resolved "https://registry.yarnpkg.com/lemmy-js-client/-/lemmy-js-client-0.9.0-rc.18.tgz#ad565166cfb541f61a8e816f66b554310246581e"
+  integrity sha512-6jeBCQa8FRfvGxL80GkNXsOfC3+kOSvpeQVXxKkNxnr+AfnBV9xbJZQuAvfyb7uC5HLqvPP1vHHrq2ZVIaHpTQ==
 
 levn@^0.4.1:
   version "0.4.1"