Remove gist.github.com, gitlab.com from default CSP (#7008)

This commit is contained in:
Tom Moor
2024-06-08 10:54:55 -04:00
committed by GitHub
parent 946cbce06e
commit c02f7c9c85
8 changed files with 156 additions and 187 deletions

View File

@@ -24,19 +24,8 @@ import auth from "../routes/auth";
// Construct scripts CSP based on services in use by this installation
const defaultSrc = ["'self'"];
const scriptSrc = [
"'self'",
"gist.github.com",
"www.googletagmanager.com",
"gitlab.com",
];
const styleSrc = [
"'self'",
"'unsafe-inline'",
"github.githubassets.com",
"gitlab.com",
];
const scriptSrc = ["'self'", "www.googletagmanager.com"];
const styleSrc = ["'self'", "'unsafe-inline'"];
if (env.isCloudHosted) {
scriptSrc.push("cdn.zapier.com");