Skip to content

Commit

Permalink
feat(familie-backend/headers.ts): legg til Nav telemetry URL-er i CSP…
Browse files Browse the repository at this point in the history
… headers

Nødvendig for å samle inn telemetri i appene våre
  • Loading branch information
GardOS committed Nov 1, 2024
1 parent d79339d commit 6d0c02b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/familie-backend/src/headers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ const fontSource = 'https://fonts.gstatic.com';
const navFontSource = 'https://cdn.nav.no';
const amplitude = 'https://amplitude.nav.no';
const sentry = 'https://sentry.gc.nav.no';
const navTelemetry = 'https://telemetry.nav.no';
const navTelemetryDev = 'https://telemetry.ekstern.dev.nav.no';

const cspString = `default-src 'self' data: ${amplitude} ${sentry}; style-src 'self' ${styleSource} data: 'unsafe-inline'; font-src 'self' ${fontSource} ${navFontSource} data:; frame-src 'self' blob:;`;
const cspString = `default-src 'self' data: ${amplitude} ${sentry} ${navTelemetry} ${navTelemetryDev}; style-src 'self' ${styleSource} data: 'unsafe-inline'; font-src 'self' ${fontSource} ${navFontSource} data:; frame-src 'self' blob:;`;

const setup = (app: Express) => {
app.disable('x-powered-by');
Expand Down

0 comments on commit 6d0c02b

Please sign in to comment.