Make sure data URIs are allowed by CSP not to block video controls
This commit is contained in:
parent
c17d7bddae
commit
dab4fc44ea
@ -217,11 +217,13 @@ function index(req, res, next) {
|
||||
];
|
||||
|
||||
// If prefetch is enabled, but storage is not, we have to allow mixed content
|
||||
// - https://user-images.githubusercontent.com is where we currently push our changelog screenshots
|
||||
// - data: is required for the HTML5 video player
|
||||
if (Helper.config.prefetchStorage || !Helper.config.prefetch) {
|
||||
policies.push("img-src 'self' https://user-images.githubusercontent.com");
|
||||
policies.push("img-src 'self' data: https://user-images.githubusercontent.com");
|
||||
policies.unshift("block-all-mixed-content");
|
||||
} else {
|
||||
policies.push("img-src http: https:");
|
||||
policies.push("img-src http: https: data:");
|
||||
}
|
||||
|
||||
res.setHeader("Content-Type", "text/html");
|
||||
|
Loading…
Reference in New Issue
Block a user