Skip to content

Commit 601958d

Browse files
committed
[Add] Framer rewrite for /framer-test route (#4577)
<!-- start pr-codex --> ## PR-Codex overview This PR updates the `next.config.js` file to enhance security policies and add new redirect paths for Framer. ### Detailed summary - Updated `style-src` and `font-src` directives to include `vercel.live`, `assets.vercel.com`, and `framerusercontent.com`. - Added `framerusercontent.com` and `events.framer.com` to the `script-src` directive. - Introduced `FRAMER_PATHS` for specific redirect paths. - Added new redirect mappings for Framer paths to `https://landing.thirdweb.com`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent bec828d commit 601958d

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

apps/dashboard/next.config.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ const ContentSecurityPolicy = `
55
img-src * data: blob:;
66
media-src * data: blob:;
77
object-src 'none';
8-
style-src 'self' 'unsafe-inline' https://vercel.live;
9-
font-src 'self' https://vercel.live https://assets.vercel.com;
8+
style-src 'self' 'unsafe-inline' vercel.live;
9+
font-src 'self' vercel.live assets.vercel.com framerusercontent.com;
1010
frame-src * data:;
11-
script-src 'self' 'unsafe-eval' 'unsafe-inline' 'wasm-unsafe-eval' 'inline-speculation-rules' *.thirdweb.com *.thirdweb-dev.com vercel.live js.stripe.com;
11+
script-src 'self' 'unsafe-eval' 'unsafe-inline' 'wasm-unsafe-eval' 'inline-speculation-rules' *.thirdweb.com *.thirdweb-dev.com vercel.live js.stripe.com framerusercontent.com events.framer.com;
1212
connect-src * data: blob:;
1313
worker-src 'self' blob:;
1414
block-all-mixed-content;
@@ -39,6 +39,9 @@ const securityHeaders = [
3939

4040
const redirects = require("./redirects");
4141

42+
// add framer paths here
43+
const FRAMER_PATHS = ["/connect/sign-in", "/contracts/modular-contracts"];
44+
4245
/**
4346
* @returns {import('next').RemotePattern[]}
4447
*/
@@ -128,6 +131,10 @@ const moduleExports = {
128131
source: "/thirdweb.eth/:path*",
129132
destination: "/deployer.thirdweb.eth/:path*",
130133
},
134+
...FRAMER_PATHS.map((path) => ({
135+
source: path,
136+
destination: `https://landing.thirdweb.com${path}`,
137+
})),
131138
];
132139
},
133140
images: {

0 commit comments

Comments
 (0)