next.config.js 557 B

1234567891011121314151617181920212223
  1. /** @type {import('next').NextConfig} */
  2. const nextConfig = {
  3. output: "standalone",
  4. async headers() {
  5. return ['admin', 'dashboard', 'login', 'payment', 'create-order'].map(segment => ({
  6. source: `/${segment}/:path*`,
  7. headers: [{ key: 'X-Robots-Tag', value: 'noindex, nofollow' }],
  8. }));
  9. },
  10. async rewrites() {
  11. return [
  12. {
  13. source: '/api/:path*',
  14. destination: `${process.env.NEXT_PUBLIC_API_URL}/api/:path*`,
  15. },
  16. ];
  17. },
  18. eslint: {
  19. ignoreDuringBuilds: true,
  20. },
  21. };
  22. module.exports = nextConfig;