mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
changed URL configs for frontend
This commit is contained in:
@@ -11,25 +11,40 @@ let dashboardUrl = null;
|
||||
let domain = null;
|
||||
let adminDashboardUrl = null;
|
||||
|
||||
// if (!isServer) {
|
||||
// if (window.location.href.indexOf('localhost') > -1) {
|
||||
// apiUrl = 'http://localhost:3002';
|
||||
// dashboardUrl = 'http://localhost:3000';
|
||||
// domain = 'localhost';
|
||||
// adminDashboardUrl = 'http://localhost:3100';
|
||||
// } else if (window.location.href.indexOf('staging') > -1) {
|
||||
// apiUrl = 'https://staging-api.fyipe.com';
|
||||
// dashboardUrl = 'http://staging-dashboard.fyipe.com';
|
||||
// domain = 'fyipe.com';
|
||||
// } else {
|
||||
// apiUrl = 'https://api.fyipe.com';
|
||||
// dashboardUrl = 'https://dashboard.fyipe.com';
|
||||
// domain = 'fyipe.com';
|
||||
// }
|
||||
|
||||
|
||||
// }
|
||||
|
||||
if (!isServer) {
|
||||
if (window.location.href.indexOf('localhost') > -1) {
|
||||
apiUrl = 'http://localhost:3002';
|
||||
dashboardUrl = 'http://localhost:3000';
|
||||
accountsUrl = 'http://localhost:3003';
|
||||
domain = 'localhost';
|
||||
adminDashboardUrl = 'http://localhost:3100';
|
||||
} else if (window.location.href.indexOf('staging') > -1) {
|
||||
apiUrl = 'https://staging-api.fyipe.com';
|
||||
dashboardUrl = 'http://staging-dashboard.fyipe.com';
|
||||
domain = 'fyipe.com';
|
||||
} else {
|
||||
apiUrl = 'https://api.fyipe.com';
|
||||
dashboardUrl = 'https://dashboard.fyipe.com';
|
||||
domain = 'fyipe.com';
|
||||
apiUrl = 'http://backend:3002';
|
||||
dashboardUrl = 'http://dashboard:3000';
|
||||
accountsUrl = 'http://accounts:3003';
|
||||
domain = 'local';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
export const API_URL = apiUrl;
|
||||
|
||||
export const DASHBOARD_URL = dashboardUrl;
|
||||
|
||||
@@ -5,17 +5,32 @@ import valid from 'card-validator';
|
||||
let apiUrl = null;
|
||||
let dashboardUrl = null;
|
||||
|
||||
if (window.location.href.indexOf('localhost') > -1) {
|
||||
apiUrl = 'http://localhost:3002';
|
||||
dashboardUrl = 'http://localhost:3000'
|
||||
} else if (window.location.href.indexOf('staging') > -1) {
|
||||
apiUrl = 'https://staging-api.fyipe.com';
|
||||
dashboardUrl = 'http://staging-dashboard.fyipe.com'
|
||||
} else {
|
||||
apiUrl = 'https://api.fyipe.com';
|
||||
dashboardUrl = 'https://fyipe.com';
|
||||
// if (window.location.href.indexOf('localhost') > -1) {
|
||||
// apiUrl = 'http://localhost:3002';
|
||||
// dashboardUrl = 'http://localhost:3000'
|
||||
// } else if (window.location.href.indexOf('staging') > -1) {
|
||||
// apiUrl = 'https://staging-api.fyipe.com';
|
||||
// dashboardUrl = 'http://staging-dashboard.fyipe.com'
|
||||
// } else {
|
||||
// apiUrl = 'https://api.fyipe.com';
|
||||
// dashboardUrl = 'https://fyipe.com';
|
||||
// }
|
||||
|
||||
if (!isServer) {
|
||||
if (window.location.href.indexOf('localhost') > -1) {
|
||||
apiUrl = 'http://localhost:3002';
|
||||
dashboardUrl = 'http://localhost:3000';
|
||||
accountsUrl = 'http://localhost:3003';
|
||||
domain = 'localhost';
|
||||
} else {
|
||||
apiUrl = 'http://backend:3002';
|
||||
dashboardUrl = 'http://dashboard:3000';
|
||||
accountsUrl = 'http://accounts:3003';
|
||||
domain = 'local';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export const API_URL = apiUrl;
|
||||
|
||||
export const DASHBOARD_URL = dashboardUrl;
|
||||
|
||||
Reference in New Issue
Block a user