Files
IdP/apps/docs/next.config.ts
2026-06-29 12:17:25 +03:00

33 lines
718 B
TypeScript

import type { NextConfig } from 'next';
const internalApiUrl = (
process.env.INTERNAL_API_URL ??
process.env.NEXT_PUBLIC_API_URL ??
'http://localhost:3000'
).replace(/\/$/, '');
const nextConfig: NextConfig = {
async rewrites() {
return [
{
source: '/idp-api/:path*',
destination: `${internalApiUrl}/:path*`
},
{
source: '/oauth/:path*',
destination: `${internalApiUrl}/oauth/:path*`
},
{
source: '/fedcm/:path*',
destination: `${internalApiUrl}/fedcm/:path*`
},
{
source: '/.well-known/:path*',
destination: `${internalApiUrl}/.well-known/:path*`
}
];
}
};
export default nextConfig;