Skip to content

Commit

Permalink
Corrige les scripts de tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
mariheck committed Oct 4, 2024
1 parent 1068651 commit 9b16954
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 16 deletions.
17 changes: 7 additions & 10 deletions packages/site/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,13 @@ export default function RootLayout({ children }: { children: JSX.Element }) {
_linkedin_partner_id = "1701996";
window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || [];
window._linkedin_data_partner_ids.push(_linkedin_partner_id);
</script><script type="text/javascript">
(function(l) {
if (!l){window.lintrk = function(a,b){window.lintrk.q.push([a,b])};
window.lintrk.q=[]}
var s = document.getElementsByTagName("script")[0];
var b = document.createElement("script");
b.type = "text/javascript";b.async = true;
b.src = "
https://snap.licdn.com/li.lms-analytics/insight.min.js";
s.parentNode.insertBefore(b, s);})(window.lintrk);
(function(l) { if (!l){window.lintrk = function(a,b){window.lintrk.q.push([a,b])}; window.lintrk.q=[]}
var s = document.getElementsByTagName("script")[0];
var b = document.createElement("script");
b.type = "text/javascript";b.async = true;
b.src = "https://snap.licdn.com/li.lms-analytics/insight.min.js";
s.parentNode.insertBefore(b, s);})(window.lintrk);
`}
</Script>

Expand Down
28 changes: 22 additions & 6 deletions packages/site/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,27 @@ export function middleware(request: NextRequest) {
// options de la politique de sécurité
const cspHeader = `
default-src 'self';
script-src ${scriptSrc} *.axept.io *.posthog.com client.crisp.chat *.googletagmanager.com *.adform.net;
script-src ${scriptSrc}
*.axept.io
*.posthog.com
client.crisp.chat
*.googletagmanager.com
*.adform.net
https://snap.licdn.com;
style-src ${styleSrc} client.crisp.chat;
img-src 'self' blob: data: ytimg.com px.ads.linkedin.com server.adform.net https://axeptio.imgix.net https://favicons.axept.io https://image.crisp.chat https://client.crisp.chat ${process.env.NEXT_PUBLIC_STRAPI_URL?.replace(
'strapiapp',
'media.strapiapp'
)};
img-src 'self' blob: data:
ytimg.com
px.ads.linkedin.com
server.adform.net
https://axeptio.imgix.net
https://favicons.axept.io
https://image.crisp.chat
https://client.crisp.chat
https://px4.ads.linkedin.com
${process.env.NEXT_PUBLIC_STRAPI_URL?.replace(
'strapiapp',
'media.strapiapp'
)};
font-src 'self' client.crisp.chat;
object-src 'none';
connect-src 'self'
Expand All @@ -41,7 +56,8 @@ export function middleware(request: NextRequest) {
*.axept.io
client.crisp.chat
wss://client.relay.crisp.chat
wss://stream.relay.crisp.chat;
wss://stream.relay.crisp.chat
https://px.ads.linkedin.com;
base-uri 'self';
form-action 'self';
frame-ancestors 'none';
Expand Down

0 comments on commit 9b16954

Please sign in to comment.