+3
-60
@@ -18,78 +18,21 @@ const nextConfig = {
|
||||
return [
|
||||
{
|
||||
source: '/demo/feedback-writer',
|
||||
destination: '/support/INTRA_GENERAL_QNA/new',
|
||||
destination: '/support/EGBIM_DEMO/new',
|
||||
permanent: false,
|
||||
},
|
||||
{
|
||||
source: '/demo/feedback-list',
|
||||
destination: '/support/INTRA_GENERAL_QNA',
|
||||
destination: '/support/EGBIM_DEMO/new',
|
||||
permanent: false,
|
||||
},
|
||||
{
|
||||
source: '/demo/feedback/:feedbackId',
|
||||
destination: '/support/INTRA_GENERAL_QNA',
|
||||
destination: '/support/EGBIM_DEMO/new',
|
||||
permanent: false,
|
||||
},
|
||||
];
|
||||
},
|
||||
async rewrites() {
|
||||
const internalApiBaseUrl =
|
||||
process.env.INTERNAL_API_BASE_URL ?? 'http://api:4000';
|
||||
const secretaryApiBaseUrl =
|
||||
process.env.SUPPORT_API_BASE_URL ??
|
||||
(process.env.NODE_ENV === 'development'
|
||||
? 'http://127.0.0.1:8010'
|
||||
: 'http://secretary-api:8010');
|
||||
|
||||
return {
|
||||
fallback: [
|
||||
// Swagger is served by the Nest API, while the public staging
|
||||
// hostname terminates at this Next.js web container. Keep the API
|
||||
// port private and proxy the documentation through the web service.
|
||||
{
|
||||
source: '/docs',
|
||||
destination: `${internalApiBaseUrl}/docs`,
|
||||
},
|
||||
{
|
||||
source: '/docs/:path*',
|
||||
destination: `${internalApiBaseUrl}/docs/:path*`,
|
||||
},
|
||||
{
|
||||
source: '/admin-docs',
|
||||
destination: `${internalApiBaseUrl}/admin-docs`,
|
||||
},
|
||||
{
|
||||
source: '/admin-docs/:path*',
|
||||
destination: `${internalApiBaseUrl}/admin-docs/:path*`,
|
||||
},
|
||||
{
|
||||
source: '/docs-json',
|
||||
destination: `${internalApiBaseUrl}/docs-json`,
|
||||
},
|
||||
{
|
||||
source: '/admin-docs-json',
|
||||
destination: `${internalApiBaseUrl}/admin-docs-json`,
|
||||
},
|
||||
{
|
||||
source: '/secretary-docs',
|
||||
destination: `${secretaryApiBaseUrl}/docs`,
|
||||
},
|
||||
{
|
||||
source: '/secretary-docs/:path*',
|
||||
destination: `${secretaryApiBaseUrl}/:path*`,
|
||||
},
|
||||
{
|
||||
source: '/secretary-docs-json',
|
||||
destination: `${secretaryApiBaseUrl}/openapi.json`,
|
||||
},
|
||||
{
|
||||
source: '/api/:path*',
|
||||
destination: `${internalApiBaseUrl}/api/:path*`,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
|
||||
Reference in New Issue
Block a user