mirror of
https://github.com/sartography/spiffworkflow-frontend.git
synced 2025-02-24 12:18:17 +00:00
support calling backend with a domain name w/ burnettk
This commit is contained in:
parent
d68d521d78
commit
790d267b9e
@ -1,7 +1,11 @@
|
||||
const host = window.location.hostname;
|
||||
export const HOST_AND_PORT = `${host}:7000`;
|
||||
|
||||
export const BACKEND_BASE_URL = `http://${HOST_AND_PORT}/v1.0`;
|
||||
let hostAndPort = `api.${host}`;
|
||||
let protocol = 'https';
|
||||
if (/^\d+\./.test(host) || host === 'localhost') {
|
||||
hostAndPort = `${host}:7000`;
|
||||
protocol = 'http';
|
||||
}
|
||||
export const BACKEND_BASE_URL = `${protocol}://${hostAndPort}/v1.0`;
|
||||
|
||||
export const PROCESS_STATUSES = [
|
||||
'not_started',
|
||||
|
Loading…
x
Reference in New Issue
Block a user