Use globalThis.location?.origin

This commit is contained in:
SrGooglo 2025-05-12 02:22:26 +00:00
parent 1e86f7638f
commit 94c8d7383e
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "comty.js", "name": "comty.js",
"version": "0.65.4", "version": "0.65.5",
"main": "./dist/index.js", "main": "./dist/index.js",
"description": "Official Comty API for JavaScript", "description": "Official Comty API for JavaScript",
"homepage": "https://github.com/ragestudio/comty.js", "homepage": "https://github.com/ragestudio/comty.js",

View File

@ -1,7 +1,7 @@
const envOrigins = { const envOrigins = {
development: globalThis.isServerMode development: globalThis.isServerMode
? "http://localhost:9000" ? "http://localhost:9000"
: `${location.origin}/api`, : `${globalThis.location?.origin}/api`,
indev: "https://indev.comty.app/api", indev: "https://indev.comty.app/api",
production: "https://api.comty.app", production: "https://api.comty.app",
} }