From: SleeplessOne1917 Date: Thu, 29 Jun 2023 11:20:45 +0000 (-0400) Subject: Allow audio captcha through CSP (#1690) X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%22https:/nerdica.net/%7BpictshareAvatarThumbnail%28?a=commitdiff_plain;h=005135d4f264d0c0faf821b7888a8f40f9356f9e;p=lemmy-ui.git Allow audio captcha through CSP (#1690) Co-authored-by: Dessalines --- diff --git a/src/server/middleware.ts b/src/server/middleware.ts index a7cc6f2..9815e71 100644 --- a/src/server/middleware.ts +++ b/src/server/middleware.ts @@ -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 {