fix and update

This commit is contained in:
lendry
2026-06-29 15:02:01 +03:00
parent 0df7240dc8
commit 01e4917acf
10 changed files with 326 additions and 132 deletions

View File

@@ -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() {