Projeto bot pontos
This commit is contained in:
21
web/next.config.ts
Normal file
21
web/next.config.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user