From 1d3c7c789440adce773659f414307cea703cc147 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Tue, 24 May 2022 16:23:04 +0300 Subject: [PATCH 01/20] fix social share for Contentful routes --- src/shared/components/Contentful/Route.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/Contentful/Route.jsx b/src/shared/components/Contentful/Route.jsx index 6a7dd02e41..4b88d43585 100644 --- a/src/shared/components/Contentful/Route.jsx +++ b/src/shared/components/Contentful/Route.jsx @@ -47,7 +47,7 @@ function ChildRoutesLoader(props) { Date: Tue, 24 May 2022 16:23:59 +0300 Subject: [PATCH 02/20] ci: on beta --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0b075aa900..faf4b3370a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -370,7 +370,7 @@ workflows: filters: branches: only: - - footer-update + - social-share-thumb # This is stage env for production QA releases - "build-prod-staging": context : org-global From b068d1342830ad9a9f973a4c9401e24c0ff8f9a3 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Wed, 25 May 2022 12:46:39 +0300 Subject: [PATCH 03/20] domain fix for social thumb --- src/shared/components/MetaTags.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/shared/components/MetaTags.jsx b/src/shared/components/MetaTags.jsx index 343d8a684d..4b192752df 100644 --- a/src/shared/components/MetaTags.jsx +++ b/src/shared/components/MetaTags.jsx @@ -24,7 +24,10 @@ function MetaTags({ feed, feedTitle, }) { - const img = `${domain}${image}`; + let img = `${domain}${image}`; + if (image.indexOf('http://') === 0 || image.indexOf('https://') === 0) { + img = `${image}`; + } const socTitle = socialTitle || title; const socDesc = socialDescription || description; return ( From 807f6faa7216c2097ab8dcd0f71e904f643706b0 Mon Sep 17 00:00:00 2001 From: eisbilir Date: Thu, 26 May 2022 00:03:45 +0300 Subject: [PATCH 04/20] add csp header for tco --- src/server/index.js | 62 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/src/server/index.js b/src/server/index.js index 0eee1228fd..9d1c10ecee 100644 --- a/src/server/index.js +++ b/src/server/index.js @@ -50,6 +50,8 @@ ts = moment(ts.timestamp).valueOf(); const sw = `sw.js${process.env.NODE_ENV === 'production' ? '' : '?debug'}`; const swScope = '/challenges'; // we are currently only interested in improving challenges pages +const tcoPattern = new RegExp(/^tco\d{2}\.topcoder(?:-dev)?\.com$/i); + const EXTRA_SCRIPTS = [ `