betfun-arena/apps/web/next.config.cjs

83 lines
1.8 KiB
JavaScript

/** @type {import('next').NextConfig} */
const { withSentryConfig } = require('@sentry/nextjs')
const nextConfig = {
outputFileTracingRoot: require('path').join(__dirname, '../../'),
transpilePackages: ['@repo/ui'],
turbopack: {
root: require('path').join(__dirname, '../../'),
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'betfun.arena',
},
{
protocol: 'https',
hostname: 'arweave.net',
},
{
protocol: 'https',
hostname: 'ipfs.io',
},
{
protocol: 'https',
hostname: 'cdn.moddio.com',
},
{
protocol: 'https',
hostname: 'imagedelivery.net',
},
],
formats: ['image/avif', 'image/webp'],
},
async headers() {
return [
{
source: '/:path*',
headers: [
{
key: 'X-DNS-Prefetch-Control',
value: 'on',
},
{
key: 'Strict-Transport-Security',
value: 'max-age=63072000; includeSubDomains; preload',
},
{
key: 'X-Frame-Options',
value: 'SAMEORIGIN',
},
{
key: 'X-Content-Type-Options',
value: 'nosniff',
},
{
key: 'X-XSS-Protection',
value: '1; mode=block',
},
{
key: 'Referrer-Policy',
value: 'origin-when-cross-origin',
},
{
key: 'Permissions-Policy',
value: 'camera=(), microphone=(), geolocation=()',
},
],
},
]
},
}
// Sentry configuration
const sentryWebpackPluginOptions = {
silent: true,
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
}
module.exports = withSentryConfig(nextConfig, sentryWebpackPluginOptions)