2
0
Files
bot/apps/landing-page/next.config.js
2022-02-10 14:33:39 +01:00

41 lines
795 B
JavaScript

// eslint-disable-next-line @typescript-eslint/no-var-requires
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
})
const securityHeaders = [
{
key: 'X-Frame-Options',
value: 'SAMEORIGIN',
},
]
module.exports = withBundleAnalyzer({
async headers() {
return [
{
source: '/(.*)',
headers: securityHeaders,
},
]
},
async redirects() {
return [
{
source: '/typebot-lib',
destination:
'https://unpkg.com/typebot-js@2.0.21/dist/index.umd.min.js',
permanent: true,
},
]
},
async rewrites() {
return [
{
source: '/:path*',
destination: `${process.env.NEXT_PUBLIC_VIEWER_HOST}/:path*`,
},
]
},
})