Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 16 additions & 27 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,35 +53,24 @@ export default async function RootLayout({children}: {children: ReactNode}): Pro
return (
<html lang={'en'}>
<head>
<link
rel={'preconnect'}
href={'https://tag.adrsbl.io'}
crossOrigin={'anonymous'}
/>

<Script
id={'adrsbl'}
id={'hypelab'}
strategy={'beforeInteractive'}
nonce={nonce}
data-tid={'de008d61a08d42559c3c09a539728156'}>
{`!function(w,d){
w.__adrsbl=w.__adrsbl||{queue:[],run:function(){this.queue.push(arguments)}};
var s=d.createElement('script');
s.async=true;

var cs=d.currentScript;
var tid=(cs && cs.getAttribute && cs.getAttribute('data-tid'))||'';
try { if (cs && 'nonce' in cs) { s.nonce = cs.nonce || ''; } } catch(e) {}

s.src='https://tag.adrsbl.io/p.js?tid='+tid;

var first=d.getElementsByTagName('script')[0];
if(first && first.parentNode){
first.parentNode.insertBefore(s, first);
} else {
(d.head||d.body||d.documentElement).appendChild(s);
}
}(window,document);`}
nonce={nonce}>
{`!(function(h,y,p,e,l,a,b){
((window.__hype_analytics=[]),(window.__hype_wids=[])),
(window.HypeLabAnalytics={
logEvent:function(){window.__hype_analytics.push(Array.prototype.slice.call(arguments))},
setWalletAddresses:function(w){window.__hype_wids=w}
}),
((a=document.createElement(h)).async=!0),
(a.src=y),
(a.onload=function(){
(l.environment=p),(l.propertySlug=e),
HypeLabAnalytics.setClient(new HypeLabAnalytics.Client(l))
}),
(b=document.getElementsByTagName(h)[0]).parentNode.insertBefore(a,b)
})('script','https://api.hypelab.com/v1/scripts/ha-sdk.js?v=0','production','4793fe16ca',{privacy:{trackAllSessions:true}});`}
</Script>
<Script
strategy={'beforeInteractive'}
Expand Down
Binary file modified bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export function middleware(request: NextRequest): NextResponse {
response.headers.set('Cross-Origin-Opener-Policy', 'same-origin')

// Set the CSP header with the nonce
const cspHeader = `default-src 'self'; script-src 'self' 'nonce-${nonce}' https://tag.adrsbl.io https://app.chatwoot.com https://widget.chatwoot.com https://cdn.weglot.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdn.weglot.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: https: blob:; media-src 'self' https:; connect-src 'self' https://app.chatwoot.com https://widget.chatwoot.com https://strapi.shapeshift.com https://cdn.weglot.com https://api.weglot.com https://cdn-api-weglot.com wss://app.chatwoot.com; frame-src 'self' https://widget.chatwoot.com https://app.chatwoot.com; worker-src 'self' blob:; object-src 'none'; base-uri 'self'; form-action 'self' https://app.chatwoot.com; frame-ancestors 'self'; upgrade-insecure-requests;`
const cspHeader = `default-src 'self'; script-src 'self' 'nonce-${nonce}' https://api.hypelab.com https://app.chatwoot.com https://widget.chatwoot.com https://cdn.weglot.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdn.weglot.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: https: blob:; media-src 'self' https:; connect-src 'self' https://api.hypelab.com https://app.chatwoot.com https://widget.chatwoot.com https://strapi.shapeshift.com https://cdn.weglot.com https://api.weglot.com https://cdn-api-weglot.com wss://app.chatwoot.com; frame-src 'self' https://widget.chatwoot.com https://app.chatwoot.com; worker-src 'self' blob:; object-src 'none'; base-uri 'self'; form-action 'self' https://app.chatwoot.com; frame-ancestors 'self'; upgrade-insecure-requests;`
response.headers.set('Content-Security-Policy', cspHeader)

// Handle locale routing
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"highlight.js": "^11.11.1",
"katex": "^0.16.21",
"motion": "^12.4.7",
"next": "^15.1.7",
"next": "^15.1.9",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-markdown": "^9.0.3",
Expand Down