update oauth
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user