Skip to content

Commit bd4eb91

Browse files
chore: make onramper widget work (#76)
Co-authored-by: thesmith <[email protected]>
1 parent 5a5a353 commit bd4eb91

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

next.config.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,9 @@ const nextConfig = {
1313
async headers() {
1414
return [
1515
{
16-
// Apply COEP/COOP globally, EXCEPT for /trade and /:locale/trade
17-
// Excludes paths that are exactly `/trade` or `/<anything>/trade`
18-
source: '/((?!(?:[^/]+/)?trade/?$).*)',
19-
headers: [
20-
{key: 'cross-origin-embedder-policy', value: 'credentialless'},
21-
{key: 'cross-origin-resource-policy', value: 'cross-origin'},
22-
{key: 'cross-origin-opener-policy', value: 'same-origin'},
23-
{key: 'Content-Security-Policy', value: "frame-ancestors 'self'"}
24-
]
16+
// Global headers (NO COEP/COOP) to avoid breaking third-party iframes on SPA nav
17+
source: '/(.*)',
18+
headers: [{key: 'cross-origin-resource-policy', value: 'cross-origin'}]
2519
},
2620
{
2721
// Specific headers for Chatwoot proxy to ensure iframe compatibility

0 commit comments

Comments
 (0)