From 3d683253f76c25ae6a1adaf2358cd6c0d768da11 Mon Sep 17 00:00:00 2001 From: Aakash Singh Date: Tue, 23 Jan 2024 22:22:05 +0530 Subject: [PATCH] fix csp for websockets --- netlify.toml | 2 +- vite.config.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/netlify.toml b/netlify.toml index 7f9ef1bae69..81925059140 100644 --- a/netlify.toml +++ b/netlify.toml @@ -28,7 +28,7 @@ status = 200 default-src 'self'; script-src 'self' 'nonce-f51b9742' https://plausible.10bedicu.in; style-src 'self' 'nonce-7e14cf80'; - connect-src 'self' https://sentry.io https://plausible.10bedicu.in https://egov-s3-facility-10bedicu.s3.amazonaws.com https://egov-s3-patient-data-10bedicu.s3.amazonaws.com; + connect-src 'self' ws: wss: https://sentry.io https://plausible.10bedicu.in https://egov-s3-facility-10bedicu.s3.amazonaws.com https://egov-s3-patient-data-10bedicu.s3.amazonaws.com; img-src 'self' blob: data: https://cdn.coronasafe.network https://egov-s3-facility-10bedicu.s3.amazonaws.com https://egov-s3-patient-data-10bedicu.s3.amazonaws.com; media-src 'self' blob: data: https://cdn.coronasafe.network https://egov-s3-facility-10bedicu.s3.amazonaws.com https://egov-s3-patient-data-10bedicu.s3.amazonaws.com; object-src 'self' blob: https://egov-s3-facility-10bedicu.s3.amazonaws.com https://egov-s3-patient-data-10bedicu.s3.amazonaws.com; diff --git a/vite.config.ts b/vite.config.ts index 5e7174e27dc..6b3c28cb650 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -103,7 +103,7 @@ export default defineConfig({ "Content-Security-Policy": `default-src 'self';\ script-src 'self' 'nonce-f51b9742' https://plausible.10bedicu.in;\ style-src 'self' 'nonce-7e14cf80';\ - connect-src 'self' https://sentry.io https://plausible.10bedicu.in ${cdnUrls};\ + connect-src 'self' ws: wss: https://sentry.io https://plausible.10bedicu.in ${cdnUrls};\ img-src 'self' blob: data: https://cdn.coronasafe.network ${cdnUrls};\ media-src 'self' blob: data: https://cdn.coronasafe.network ${cdnUrls};\ object-src 'self' blob: ${cdnUrls};`,