diff --git a/next.config.ts b/next.config.ts index 050ff52..ea835e3 100644 --- a/next.config.ts +++ b/next.config.ts @@ -3,6 +3,15 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { // Isso gera um diretório otimizado que inclui tudo o que a aplicação precisa para rodar output: "standalone", + async rewrites() { + return [ + { + // Tudo que começar com /api/v1 será redirecionado + source: '/api/v1/:path*', + destination: 'http://api_saas_api_homologacao:8000/api/v1/:path*', + }, + ]; + }, }; export default nextConfig; diff --git a/src/config/app.json b/src/config/app.json index 0743536..f53f12a 100644 --- a/src/config/app.json +++ b/src/config/app.json @@ -1,7 +1,7 @@ { "state": "go", "api": { - "url": "http://api_saas_api_homologacao:8000/", + "url": "/", "prefix": "api/v1/", "content_type": "application/json" }