fix: allow storage.sase.tr in CSP for schema images
Some checks failed
CI / Lint, Typecheck, Test & Build (push) Has been cancelled

Helmet's default CSP blocked images from storage.sase.tr (different
origin). Add it to img-src and connect-src directives.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-05 14:31:54 +00:00
parent 0d5e254479
commit 63f6309bf3

View File

@@ -17,7 +17,22 @@ async function bootstrap() {
app.setGlobalPrefix("api");
// Security headers
app.use(helmet());
app.use(
helmet({
contentSecurityPolicy: {
directives: {
defaultSrc: ["'self'"],
scriptSrc: ["'self'"],
styleSrc: ["'self'", "https:", "'unsafe-inline'"],
imgSrc: ["'self'", "data:", "https://storage.sase.tr"],
fontSrc: ["'self'", "https:", "data:"],
connectSrc: ["'self'", "https://storage.sase.tr"],
objectSrc: ["'none'"],
frameSrc: ["'none'"],
},
},
}),
);
app.enableCors({
origin: corsOrigins,