Files
brapi-java/frontend/next.config.js
2026-05-28 11:56:17 +08:00

23 lines
520 B
JavaScript

/** @type {import('next').NextConfig} */
const nextConfig = {
async rewrites() {
const apiBaseUrl = process.env.API_BASE_URL || "http://localhost:8081";
return [
{
source: "/auth/:path*",
destination: `${apiBaseUrl}/auth/:path*`,
},
{
source: "/brapi/v2/:path*",
destination: `${apiBaseUrl}/brapi/v2/:path*`,
},
{
source: "/api/:path*",
destination: `${apiBaseUrl}/api/:path*`,
},
];
},
};
module.exports = nextConfig;