]> Untitled Git - lemmy-ui.git/commitdiff
Allow audio captcha through CSP (#1690)
authorSleeplessOne1917 <abias1122@gmail.com>
Thu, 29 Jun 2023 11:20:45 +0000 (07:20 -0400)
committerGitHub <noreply@github.com>
Thu, 29 Jun 2023 11:20:45 +0000 (07:20 -0400)
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
src/server/middleware.ts

index a7cc6f2bc4f8f58a520d62f5d58a3b10c91ccb64..9815e71e1f520171c4f7fe23387675b39e40b6c8 100644 (file)
@@ -10,7 +10,7 @@ export function setDefaultCsp({
 }) {
   res.setHeader(
     "Content-Security-Policy",
-    `default-src 'self'; manifest-src *; connect-src *; img-src * data:; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; form-action 'self'; base-uri 'self'; frame-src *; media-src *`
+    `default-src 'self'; manifest-src *; connect-src *; img-src * data:; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; form-action 'self'; base-uri 'self'; frame-src *; media-src * data:`
   );
 
   next();
@@ -30,7 +30,7 @@ export function setCacheControl({
   next: NextFunction;
 }) {
   const user = UserService.Instance;
-  let caching;
+  let caching: string;
   if (user.auth()) {
     caching = "private";
   } else {