Skip to content

Commit

Permalink
Corrections sur l'intégration de crisp au site
Browse files Browse the repository at this point in the history
  • Loading branch information
mariheck committed Oct 3, 2024
1 parent 004a8bb commit 1fca976
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/site/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default function RootLayout({ children }: { children: JSX.Element }) {
{/* crisp widget */}
<Script id="crisp" type="text/javascript">{`
window.$crisp = [];
window.CRISP_WEBSITE_ID = '%NEXT_PUBLIC_CRISP_WEBSITE_ID%';
window.CRISP_WEBSITE_ID = '${process.env.NEXT_PUBLIC_CRISP_WEBSITE_ID}';
(function () {
d = document;
s = d.createElement('script');
Expand Down
7 changes: 5 additions & 2 deletions packages/site/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function middleware(request: NextRequest) {
default-src 'self';
script-src ${scriptSrc} *.axept.io *.posthog.com client.crisp.chat;
style-src ${styleSrc} client.crisp.chat;
img-src 'self' blob: data: ytimg.com ${process.env.NEXT_PUBLIC_STRAPI_URL?.replace(
img-src 'self' blob: data: ytimg.com https://image.crisp.chat https://client.crisp.chat ${process.env.NEXT_PUBLIC_STRAPI_URL?.replace(
'strapiapp',
'media.strapiapp'
)};
Expand All @@ -38,7 +38,10 @@ export function middleware(request: NextRequest) {
${process.env.NEXT_PUBLIC_STRAPI_URL!}
ws://${request.nextUrl.host}
*.posthog.com
*.axept.io;
*.axept.io
client.crisp.chat
wss://client.relay.crisp.chat
wss://stream.relay.crisp.chat;
base-uri 'self';
form-action 'self';
frame-ancestors 'none';
Expand Down

0 comments on commit 1fca976

Please sign in to comment.