import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  outputFileTracingRoot: process.cwd(),
  devIndicators: false,
  poweredByHeader: false,
  images: {
    remotePatterns: [
      {
        protocol: "https",
        hostname: "images.unsplash.com"
      }
    ]
  },
  async headers() {
    return [{
      source: "/(.*)",
      headers: [
        { key: "X-Content-Type-Options", value: "nosniff" },
        { key: "X-Frame-Options", value: "DENY" },
        { key: "Referrer-Policy", value: "strict-origin-when-cross-origin" },
        { key: "Permissions-Policy", value: "camera=(), microphone=(), geolocation=(), payment=()" },
        { key: "Cross-Origin-Opener-Policy", value: "same-origin" }
      ]
    }];
  },
  async redirects() {
    return [
      { source: "/our-menu/", destination: "/menu", permanent: true },
      { source: "/shop/", destination: "/delivery", permanent: true },
      { source: "/otzivi/", destination: "/#reviews", permanent: true },
      { source: "/about-us/", destination: "/legend", permanent: true },
      { source: "/contact/", destination: "/contacts", permanent: true },
      { source: "/product/:slug*", destination: "/menu", permanent: true }
    ];
  }
};

export default nextConfig;
