fix: auto-select /api for non-localhost deployments
This commit is contained in:
parent
902988276c
commit
26ad6ec7fe
1 changed files with 5 additions and 1 deletions
|
|
@ -1,4 +1,8 @@
|
|||
const API_BASE = window.STAYSENSE_API_BASE || "http://127.0.0.1:8787";
|
||||
const DEFAULT_API_BASE =
|
||||
window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1"
|
||||
? "http://127.0.0.1:8787"
|
||||
: "/api";
|
||||
const API_BASE = window.STAYSENSE_API_BASE || DEFAULT_API_BASE;
|
||||
|
||||
const DEVICE_TOKEN_KEY = "staysense.device_token.v1";
|
||||
const SETTINGS_KEY = "staysense.settings.v1";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue