const bundleAnalyzer = require ( '@next/bundle-analyzer' ) ; const withBundleAnalyzer = bundleAnalyzer ( { enabled : process . env . ANALYZE === 'true' , } ) ; module . exports = withBundleAnalyzer ( { eslint : { ignoreDuringBuilds : true , } , poweredByHeader : false , reactStrictMode : true , headers ( ) { return [ { source : '/(.*)' , headers : [ { key : 'Referrer-Policy' , value : 'same-origin' , } , { key : 'X-Frame-Options' , value : 'DENY' , } , { key : 'X-Content-Type-Options' , value : 'nosniff' , } , { key : 'X-DNS-Prefetch-Control' , value : 'on' , } , { key : 'Strict-Transport-Security' , value : 'max-age=31536000; includeSubDomains; preload' , } , { key : 'Permissions-Policy' , value : 'camera=(), microphone=(), geolocation=(), interest-cohort=()' , } , ] , } , ] ; } , async rewrites ( ) { return [ { source : '/u/:username' , destination : '/user/:username' , } , { source : '/r/:resort' , destination : '/resort/:resort' , } , ] ; } , async redirects ( ) { return [ { source : '/oss/github' , destination : 'https://github.com/oasis-sh/oasis' , permanent : false , } , ] ; } , webpack : ( config , { webpack } ) => { config . plugins . push ( new webpack . ProvidePlugin ( { React : 'react' , } ) ) ; return config ; } , } ) ;