This commit is contained in:
2026-02-06 12:35:32 +03:00
parent b42a1dfd16
commit af5f80c688
5 changed files with 13 additions and 11 deletions

View File

@ -1,6 +1,6 @@
// В браузере — относительный URL (запросы на тот же хост, Next проксирует /api на бэкенд)
const API_BASE =
typeof window !== 'undefined' ? '' : (process.env.API_URL || 'http://localhost:3125');
typeof window !== 'undefined' ? '' : (process.env.INTERNAL_API_URL || process.env.API_URL || 'http://localhost:3125');
const API_URL = API_BASE ? `${API_BASE.replace(/\/$/, '')}/api` : '/api';
const STORAGE_KEY = 'coursecraft_api_token';