text: const { withContentlayer } = require('next-contentlayer');
  
  /**
   * @type {import('next').NextConfig}
   */
  module.exports = withContentlayer({
    // swcMinify: true,
    reactStrictMode: true,
    images: {
      domains: [
        'i.scdn.co', // Spotify Album Art
        'pbs.twimg.com', // Twitter Profile Picture
        'cdn.ady.systems', // Personal CDN
      ],
    },
  });
  
  // https://nextjs.org/docs/advanced-features/security-headers
  const ContentSecurityPolicy = `
      default-src 'self';
      script-src 'self' 'unsafe-eval' 'unsafe-inline' *.spotify.com *.ady.systems;
      child-src *.youtube.com *.google.com *.twitter.com;
      style-src 'self' 'unsafe-inline' *.ady.systems cdn.ady.systems i.scdn.co *.scdn.co;
      img-src * blob: data:;
      media-src 'none' *.scdn.co;
      connect-src *;
      font-src 'self' *.ady.systems cdn.ady.systems;
  `;
  
  const securityHeaders = [
    // https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP
    {
      key: 'Content-Security-Policy',
      value: ContentSecurityPolicy.replace(/\n/g, ''),
    },
    // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy
    {
      key: 'Referrer-Policy',
      value: 'origin-when-cross-origin',
    },
    {
      key: 'X-Frame-Options',
      value: 'DENY',
    },
    // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
    {
      key: 'X-Content-Type-Options',
      value: 'nosniff',
    },
    // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-DNS-Prefetch-Control
    {
      key: 'X-DNS-Prefetch-Control',
      value: 'on',
    },
  
    // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
    {
      key: 'Strict-Transport-Security',
      value: 'max-age=31536000; includeSubDomains; preload',
    },
    // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy
    {
      key: 'Permissions-Policy',
      value: 'camera=(), microphone=(), geolocation=()',
    },
    {
      key: 'Access-Control-Allow-Origin',
      value: '*',
    },
    {
      key: 'Referrer-Policy',
      value: 'origin-when-cross-origin',
    },
  ];
  