File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,32 @@ const nextConfig = {
5757 } ,
5858 async rewrites ( ) {
5959 return [
60+ // Rewrite vault detail pages for bots to SSR endpoint
61+ {
62+ source : '/vaults/:vaultAddress/details' ,
63+ destination : '/api/ssr/vaults/:vaultAddress' ,
64+ has : [
65+ {
66+ type : 'header' ,
67+ key : 'User-Agent' ,
68+ value :
69+ '(facebook|twitter|linkedin|telegram|discord|bot|crawl|spider|facebookexternalhit|Facebot|Twitterbot|TelegramBot|XtilesBot)' ,
70+ } ,
71+ ] ,
72+ } ,
73+ // Also handle wallet-prefixed vault URLs for bots
74+ {
75+ source : '/wallets/:wallet/vaults/:vaultAddress/details' ,
76+ destination : '/api/ssr/vaults/:vaultAddress' ,
77+ has : [
78+ {
79+ type : 'header' ,
80+ key : 'User-Agent' ,
81+ value :
82+ '(facebook|twitter|linkedin|telegram|discord|bot|crawl|spider|facebookexternalhit|Facebot|Twitterbot|TelegramBot|XtilesBot)' ,
83+ } ,
84+ ] ,
85+ } ,
6086 // Rewrite frontend routes for non-bot user agents (excluding API routes)
6187 {
6288 source : '/((?!api|_next|favicon).*)' ,
You can’t perform that action at this time.
0 commit comments