fix and update
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
import type { NextConfig } from 'next';
|
||||
|
||||
const internalApiUrl = (
|
||||
process.env.INTERNAL_API_URL ??
|
||||
process.env.NEXT_PUBLIC_API_URL ??
|
||||
'http://localhost:3000'
|
||||
).replace(/\/$/, '');
|
||||
function resolveInternalApiUrl(fallback = 'http://localhost:3000') {
|
||||
const explicit = process.env.INTERNAL_API_URL?.trim();
|
||||
if (explicit) {
|
||||
return explicit.replace(/\/+$/, '');
|
||||
}
|
||||
return fallback.replace(/\/+$/, '');
|
||||
}
|
||||
|
||||
const internalApiUrl = resolveInternalApiUrl('http://localhost:3000');
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
async rewrites() {
|
||||
|
||||
Reference in New Issue
Block a user