SPB Git forge

spb/spinza

Public
8commits 1branches 0releases
1.6 MBsize
maindefault branch
16 days agolast push
TypeScript 97.6% SQL 1.4% JavaScript 0.5%
1.1 KB · 33 lines typescript
Raw Blame History
1import type { NextConfig } from "next";23const apiUrl = (process.env.API_URL ?? "http://127.0.0.1:8231").replace(/\/$/, "");45const nextConfig: NextConfig = {6  reactStrictMode: true,7  agentRules: false,8  poweredByHeader: false,9  transpilePackages: ["@spinza/shared", "@spinza/game-core", "@spinza/games"],10  async rewrites() {11    // The whole /api namespace is served by the Fastify service on the loopback interface.12    return [{ source: "/api/:path*", destination: `${apiUrl}/api/:path*` }];13  },14  async redirects() {15    return [{ source: "/:path*", has: [{ type: "host", value: "spinza.dev" }], destination: "https://www.spinza.dev/:path*", permanent: true }];16  },17  async headers() {18    return [19      {20        source: "/(.*)",21        headers: [22          { key: "X-Content-Type-Options", value: "nosniff" },23          { key: "X-Frame-Options", value: "DENY" },24          { key: "Referrer-Policy", value: "strict-origin-when-cross-origin" },25          { key: "Permissions-Policy", value: "camera=(), microphone=(), geolocation=(), payment=()" },26        ],27      },28    ];29  },30};3132export default nextConfig;33