Merge pull request #1592 from minorninth/csp_media_src_data_urls

CSP should allow data urls for media-src or the audio captcha won't work
This commit is contained in:
SleeplessOne1917 2023-06-25 19:21:05 +00:00 committed by GitHub
commit 973bab1313
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,7 @@ import type { NextFunction, Response } from "express";
export default function ({ res, next }: { res: Response; next: NextFunction }) { export default function ({ res, next }: { res: Response; next: NextFunction }) {
res.setHeader( res.setHeader(
"Content-Security-Policy", "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(); next();