Skip to content

Commit 0d88271

Browse files
iamjr15claude
andcommitted
fix: redirect www to non-www for Clerk CORS compatibility
Clerk proxy domain is configured for trycheatcode.com, so all www requests need to be redirected to the non-www version. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 8617843 commit 0d88271

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

frontend/next.config.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,22 @@ const nextConfig: NextConfig = {
1313
},
1414
],
1515
},
16+
// Redirect www to non-www for Clerk compatibility
17+
async redirects() {
18+
return [
19+
{
20+
source: '/:path*',
21+
has: [
22+
{
23+
type: 'host',
24+
value: 'www.trycheatcode.com',
25+
},
26+
],
27+
destination: 'https://trycheatcode.com/:path*',
28+
permanent: true,
29+
},
30+
];
31+
},
1632
};
1733

1834
export default nextConfig;

0 commit comments

Comments
 (0)