Allow embedding of GitLab snippets (#6217)

This commit is contained in:
Andrew Smith
2023-11-28 00:35:37 +11:00
committed by GitHub
parent ca737ab641
commit 8f53f3b28c
5 changed files with 88 additions and 2 deletions

View File

@@ -24,9 +24,19 @@ 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"];
const scriptSrc = [
"'self'",
"gist.github.com",
"www.googletagmanager.com",
"gitlab.com",
];
const styleSrc = ["'self'", "'unsafe-inline'", "github.githubassets.com"];
const styleSrc = [
"'self'",
"'unsafe-inline'",
"github.githubassets.com",
"gitlab.com",
];
if (env.isCloudHosted) {
scriptSrc.push("cdn.zapier.com");