From 71b7ef1186c208a1d31549e2c13ec2cce49073c3 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Mon, 19 Oct 2020 07:43:03 -0700 Subject: [PATCH] fix: Websockets cannot connect in Safari --- server/app.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/server/app.js b/server/app.js index c86ce06f7..d172be9cb 100644 --- a/server/app.js +++ b/server/app.js @@ -150,13 +150,16 @@ app.use( styleSrc: ["'self'", "'unsafe-inline'", "github.githubassets.com"], imgSrc: ["*", "data:", "blob:"], frameSrc: ["*"], - connectSrc: compact([ - "'self'", - process.env.AWS_S3_UPLOAD_BUCKET_URL.replace("s3:", "localhost:"), - "www.google-analytics.com", - "api.github.com", - "sentry.io", - ]), + connectSrc: ["*"], + // Removed because connect-src: self + websockets does not work in Safari + // Ref: https://bugs.webkit.org/show_bug.cgi?id=201591 + // connectSrc: compact([ + // "'self'", + // process.env.AWS_S3_UPLOAD_BUCKET_URL.replace("s3:", "localhost:"), + // "www.google-analytics.com", + // "api.github.com", + // "sentry.io", + // ]), }, }) );