update oauth

This commit is contained in:
lendry
2026-06-25 14:40:05 +03:00
parent 1796008a28
commit 6c63343fc7
19 changed files with 623 additions and 200 deletions

View File

@@ -1,5 +1,28 @@
import type { NextConfig } from 'next';
const nextConfig: NextConfig = {};
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: '/.well-known/:path*',
destination: `${internalApiUrl}/.well-known/:path*`
}
];
}
};
export default nextConfig;