Skip to content

Commit

Permalink
Merge pull request #921 from adobecom/MWPW-163975
Browse files Browse the repository at this point in the history
MWPW-163975 CSP Support aem.live and aem.page
  • Loading branch information
TsayAdobe authored Dec 16, 2024
2 parents b38c7cf + ee83217 commit ce6fa7e
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 24 deletions.
3 changes: 3 additions & 0 deletions acrobat/scripts/contentSecurityPolicy/csp.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ const STAGE_ENVS = [
'main--dc--adobecom.hlx.page',
'main--dc--adobecom.hlx.live',
'stage--dc--adobecom.hlx.page',
'main--dc--adobecom.aem.page',
'main--dc--adobecom.aem.live',
'stage--dc--adobecom.aem.page',
];

async function getCspEnv() {
Expand Down
25 changes: 8 additions & 17 deletions acrobat/scripts/contentSecurityPolicy/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,14 @@ const connectSrc = [
'pips.taboola.com',
'trc.taboola.com',
'js.adsrvr.org',
'main--milo--adobecom.hlx.page',
'main--dc--adobecom.hlx.page',
'main--dc--adobecom.hlx.live',
'http://localhost:6456/',
'ws://local-test.acrobat.com:*',
'wss://local-test.acrobat.com:*',
'main--milo--adobecom.hlx.live',
'fast-track--milo--adobecom.hlx.page',
'fast-track--milo--adobecom.hlx.live',
'*.typekit.net',
'*.hlx.page',
'*.hlx.live',
'*.aem.page',
'*.aem.live',
'cdn.linkedin.oribi.io',
'adobedc.demdex.net/',
'*.facebook.com',
Expand Down Expand Up @@ -151,15 +147,11 @@ const imgSrc = [
'www.linkedin.com',
'www.facebook.com',
's.tgm.yahoo-net.jp',
'main--dc--adobecom.hlx.page',
'main--acrobat--adobecom.hlx.page',
'main--milo--adobecom.hlx.page',
'http://localhost:6456/',
'main--milo--adobecom.hlx.live',
'fast-track--milo--adobecom.hlx.page',
'fast-track--milo--adobecom.hlx.live',
'*.hlx.page',
'*.hlx.live',
'*.aem.page',
'*.aem.live',
'client.messaging.adobe.com/',
'ad.doubleclick.net',
';',
Expand Down Expand Up @@ -212,12 +204,11 @@ const scriptSrc = [
'main--milo--adobecom.hlx.page',
'stage.adobeccstatic.com',
'http://localhost:6456/',
'main--milo--adobecom.hlx.live',
'fast-track--milo--adobecom.hlx.page',
'fast-track--milo--adobecom.hlx.live',
'api.demandbase.com',
'*.hlx.page',
'*.hlx.live',
'*.aem.page',
'*.aem.live',
'tr.snapchat.com',
'\'sha256-XZLMiKjK7kZsMSJR/aV6U3pMxjqlvU6v3tJSIimxjHs=\'',
';',
Expand All @@ -226,8 +217,6 @@ const scriptSrc = [
const styleSrc = [
'\'self\'',
'\'unsafe-inline\'',
'main--milo--adobecom.hlx.page',
'main--milo--adobecom.hlx.live',
'*.adobe.com',
'accounts.google.com/gsi/style',
'dc.dev.dexilab.acrobat.com',
Expand All @@ -238,6 +227,8 @@ const styleSrc = [
'http://localhost:6456/',
'*.hlx.page',
'*.hlx.live',
'*.aem.page',
'*.aem.live',
';',
];

Expand Down
10 changes: 10 additions & 0 deletions acrobat/scripts/contentSecurityPolicy/prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const connectSrc = [
'tag-logger.demandbase.com',
'accounts.google.com/gsi/',
'acom-reviews--adobe.hlx.live/reviews-api/',
'acom-reviews--adobe.aem.live/reviews-api/',
'ade0164.d41.co/',
'adobe.tt.omtrdc.net',
'adobedc.demdex.net/',
Expand All @@ -41,6 +42,9 @@ const connectSrc = [
'main--dc--adobecom.hlx.page',
'main--milo--adobecom.hlx.page',
'main--dc--adobecom.hlx.live',
'main--dc--adobecom.aem.page',
'main--milo--adobecom.aem.page',
'main--dc--adobecom.aem.live',
'cdn.linkedin.oribi.io',
'*.typekit.net/',
'trial-eum-clienttons-s.akamaihd.net/',
Expand All @@ -52,6 +56,8 @@ const connectSrc = [
'ad.doubleclick.net',
'main--unity--adobecom.hlx.live',
'main--unity--adobecom.hlx.page',
'main--unity--adobecom.aem.live',
'main--unity--adobecom.aem.page',
';',
];

Expand Down Expand Up @@ -151,6 +157,8 @@ const imgSrc = [
'www.linkedin.com',
'main--dc--adobecom.hlx.page',
'main--milo--adobecom.hlx.page',
'main--dc--adobecom.aem.page',
'main--milo--adobecom.aem.page',
'a5.behance.net',
'www.googletagmanager.com',
'milo.adobe.com',
Expand Down Expand Up @@ -237,6 +245,7 @@ const scriptSrc = [
'trc.taboola.com',
'js.adsrvr.org',
'main--milo--adobecom.hlx.page',
'main--milo--adobecom.aem.page',
'tag.demandbase.com',
'*.typekit.net',
'zn3n5vyia1vy8b4ly-adobe.siteintercept.qualtrics.com/',
Expand All @@ -258,6 +267,7 @@ const styleSrc = [
'prod.adobeccstatic.com',
'use.typekit.net',
'main--milo--adobecom.hlx.page',
'main--milo--adobecom.aem.page',
'p.typekit.net',
';',
];
Expand Down
15 changes: 8 additions & 7 deletions acrobat/scripts/contentSecurityPolicy/stage.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,13 @@ const connectSrc = [
'siteintercept.qualtrics.com/',
'tr.snapchat.com/',
'*.typekit.net',
'main--dc--adobecom.hlx.page',
'main--milo--adobecom.hlx.page',
'main--dc--adobecom.hlx.live',
'http://localhost:6456/',
'ws://local-test.acrobat.com:*',
'wss://local-test.acrobat.com:*',
'*.hlx.page',
'*.hlx.live',
'*.aem.page',
'*.aem.live',
'cdn.linkedin.oribi.io',
'*.akstat.io/',
'facebook.com',
Expand Down Expand Up @@ -157,12 +156,12 @@ const imgSrc = [
'www.googletagmanager.com/',
'www.linkedin.com',
'milo.adobe.com',
'main--dc--adobecom.hlx.page',
'main--milo--adobecom.hlx.page',
'a5.behance.net',
'http://localhost:6456/',
'*.hlx.page',
'*.hlx.live',
'*.aem.page',
'*.aem.live',
's.yimg.jp',
'yjtag.yahoo.co.jp',
'client.messaging.adobe.com/',
Expand Down Expand Up @@ -252,10 +251,11 @@ const scriptSrc = [
'pips.taboola.com',
'trc.taboola.com',
'js.adsrvr.org',
'main--milo--adobecom.hlx.page',
'http://localhost:6456/',
'*.hlx.page',
'*.hlx.live',
'*.aem.page',
'*.aem.live',
's.tgm.yahoo-net.jp',
's.yimg.jp',
'yjtag.yahoo.co.jp',
Expand All @@ -273,10 +273,11 @@ const styleSrc = [
'stage.adobeccstatic.com',
'use.typekit.net',
'p.typekit.net',
'main--milo--adobecom.hlx.page',
'http://localhost:6456/',
'*.hlx.page',
'*.hlx.live',
'*.aem.page',
'*.aem.live',
';',
];

Expand Down

0 comments on commit ce6fa7e

Please sign in to comment.