Files
bot-pontos/web/next.config.ts
2026-10-23 22:31:02 -03:00

22 lines
587 B
TypeScript

import type { NextConfig } from "next";
// Endereço da API Go na rede interna do Docker. O navegador nunca fala com
// ela diretamente: as chamadas a /api/v1/* chegam ao Next (mesma origem) e
// são repassadas para cá (ARQUITETURA.md, 5.3).
const apiInternalUrl = process.env.API_INTERNAL_URL ?? "http://api:8080";
const nextConfig: NextConfig = {
output: "standalone",
poweredByHeader: false,
async rewrites() {
return [
{
source: "/api/v1/:path*",
destination: `${apiInternalUrl}/api/v1/:path*`,
},
];
},
};
export default nextConfig;