mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 19:14:16 +00:00
support indev remotes
This commit is contained in:
parent
4634691b31
commit
d9ae52c88a
@ -1,4 +1,10 @@
|
|||||||
function composeRemote(path) {
|
function composeRemote(path) {
|
||||||
|
if (typeof window !== "undefined") {
|
||||||
|
if (window.localStorage.getItem("comty:use_indev") || window.location.hostname === "indev.comty.app") {
|
||||||
|
return envOrigins["indev"][path]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return envOrigins[process.env.NODE_ENV ?? "production"][path]
|
return envOrigins[process.env.NODE_ENV ?? "production"][path]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -19,6 +25,14 @@ const envOrigins = {
|
|||||||
music: `http://${getCurrentHostname()}:3050`,
|
music: `http://${getCurrentHostname()}:3050`,
|
||||||
files: `http://${getCurrentHostname()}:3060`,
|
files: `http://${getCurrentHostname()}:3060`,
|
||||||
},
|
},
|
||||||
|
"indev": {
|
||||||
|
default: `https://indev_api.comty.app/default`,
|
||||||
|
chat: `https://indev_api.comty.app/chat`,
|
||||||
|
livestreaming: `https://indev_api.comty.app/livestreaming`,
|
||||||
|
marketplace: `https://indev_api.comty.app/marketplace`,
|
||||||
|
music: `https://indev_api.comty.app/music`,
|
||||||
|
files: `https://indev_api.comty.app/files`,
|
||||||
|
},
|
||||||
"production": {
|
"production": {
|
||||||
default: "https://api.comty.app",
|
default: "https://api.comty.app",
|
||||||
chat: `https://chat_api.comty.app`,
|
chat: `https://chat_api.comty.app`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user