🔧 Rewrite viewer to landing-page
This commit is contained in:
@@ -3,14 +3,6 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({
|
||||
enabled: process.env.ANALYZE === 'true',
|
||||
})
|
||||
|
||||
const pages = [
|
||||
'pricing',
|
||||
'privacy-policies',
|
||||
'terms-of-service',
|
||||
'about',
|
||||
'oss-friends',
|
||||
]
|
||||
|
||||
module.exports = withBundleAnalyzer({
|
||||
transpilePackages: ['utils', 'models'],
|
||||
async redirects() {
|
||||
@@ -28,36 +20,4 @@ module.exports = withBundleAnalyzer({
|
||||
},
|
||||
]
|
||||
},
|
||||
async rewrites() {
|
||||
return {
|
||||
beforeFiles: [
|
||||
{
|
||||
source: '/_next/static/:static*',
|
||||
destination:
|
||||
process.env.NEXT_PUBLIC_VIEWER_URL + '/_next/static/:static*',
|
||||
has: [
|
||||
{
|
||||
type: 'header',
|
||||
key: 'referer',
|
||||
value:
|
||||
process.env.LANDING_PAGE_HOST +
|
||||
'/(?!' +
|
||||
pages.join('|') +
|
||||
'|\\?).+',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
fallback: [
|
||||
{
|
||||
source: '/:typebotId*',
|
||||
destination: process.env.NEXT_PUBLIC_VIEWER_URL + '/:typebotId*',
|
||||
},
|
||||
{
|
||||
source: '/api/:path*',
|
||||
destination: process.env.NEXT_PUBLIC_VIEWER_URL + '/api/:path*',
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user