Deployment scripts
This commit is contained in:
@@ -42,6 +42,13 @@ type AuthMode = 'none' | 'client' | 'admin' | 'manager';
|
||||
type ApiFetch = typeof fetch;
|
||||
|
||||
function getApiBaseUrl() {
|
||||
if (!browser) {
|
||||
const internalBaseUrl = typeof process !== 'undefined' ? process.env.INTERNAL_API_BASE_URL?.trim() : '';
|
||||
if (internalBaseUrl) {
|
||||
return internalBaseUrl.replace(/\/+$/, '');
|
||||
}
|
||||
}
|
||||
|
||||
const configuredBaseUrl = env.PUBLIC_API_BASE_URL?.trim();
|
||||
if (configuredBaseUrl) {
|
||||
return configuredBaseUrl.replace(/\/+$/, '');
|
||||
|
||||
Reference in New Issue
Block a user