fix idp on started

This commit is contained in:
lendry
2026-06-24 17:53:58 +03:00
parent b6987f4aea
commit 21f2a1c227
7 changed files with 211 additions and 50 deletions

View File

@@ -1,7 +1,27 @@
import type { NextConfig } from 'next';
const internalApiUrl = (
process.env.INTERNAL_API_URL ??
process.env.NEXT_PUBLIC_API_URL ??
'http://localhost:3000'
).replace(/\/$/, '');
const internalWsUrl = (process.env.INTERNAL_WS_URL ?? 'http://media-ws:8085').replace(/\/$/, '');
const nextConfig: NextConfig = {
typedRoutes: false
typedRoutes: false,
async rewrites() {
return [
{
source: '/idp-api/ws',
destination: `${internalWsUrl}/ws`
},
{
source: '/idp-api/:path*',
destination: `${internalApiUrl}/:path*`
}
];
}
};
export default nextConfig;