From aff391a7121f20ffb4b17020619cf7fd44130103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Ba=C3=B1ados=20Schwerter?= Date: Thu, 19 Dec 2024 18:26:27 +0000 Subject: [PATCH 1/3] FIX: Report of sound not working in itwewina --- src/morphodict/site/securemiddleware.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/morphodict/site/securemiddleware.py b/src/morphodict/site/securemiddleware.py index 719742d7f..2d9157254 100644 --- a/src/morphodict/site/securemiddleware.py +++ b/src/morphodict/site/securemiddleware.py @@ -19,6 +19,7 @@ .img_src("'self'") .connect_src("'self'", "speech-db.altlab.app") .font_src("'self'", "fonts.gstatic.com", "fonts.googleapis.com") + .media_src("'self'", "speech-db.altlab.app") ) secure_headers = Secure(csp=csp) From 1215d5b3ea4ef3652bc995b79da4d6365b97b717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Ba=C3=B1ados=20Schwerter?= Date: Thu, 19 Dec 2024 20:20:49 +0000 Subject: [PATCH 2/3] FIX: securemiddleware aggregating servers for media --- src/morphodict/site/securemiddleware.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/morphodict/site/securemiddleware.py b/src/morphodict/site/securemiddleware.py index 2d9157254..13e758743 100644 --- a/src/morphodict/site/securemiddleware.py +++ b/src/morphodict/site/securemiddleware.py @@ -13,13 +13,13 @@ csp = ( ContentSecurityPolicy() - .default_src("'self'") + .default_src("'self'", "speech-db.altlab.app") .script_src("'self'", "cdn.example.com") .style_src("'self'", "fonts.googleapis.com", "'unsafe-inline'") .img_src("'self'") .connect_src("'self'", "speech-db.altlab.app") .font_src("'self'", "fonts.gstatic.com", "fonts.googleapis.com") - .media_src("'self'", "speech-db.altlab.app") + .media_src("'self'", "http://speech-db.altlab.app", "https://speech-db.altlab.app") ) secure_headers = Secure(csp=csp) From 081a1a46c5878f46e19f6543288a6df6330cdd10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Ba=C3=B1ados=20Schwerter?= Date: Thu, 19 Dec 2024 23:15:33 +0000 Subject: [PATCH 3/3] Removed example cdn --- src/morphodict/site/securemiddleware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/morphodict/site/securemiddleware.py b/src/morphodict/site/securemiddleware.py index 13e758743..e3e0b7463 100644 --- a/src/morphodict/site/securemiddleware.py +++ b/src/morphodict/site/securemiddleware.py @@ -14,7 +14,7 @@ csp = ( ContentSecurityPolicy() .default_src("'self'", "speech-db.altlab.app") - .script_src("'self'", "cdn.example.com") + .script_src("'self'") .style_src("'self'", "fonts.googleapis.com", "'unsafe-inline'") .img_src("'self'") .connect_src("'self'", "speech-db.altlab.app")