mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-18 02:19:09 +00:00
fix(web): getDefaultApiUrl should handle stage.roleypoly.com as stage
This commit is contained in:
parent
cd448b56c9
commit
a87ccd9c54
2 changed files with 6 additions and 2 deletions
|
@ -1,7 +1,10 @@
|
|||
export const getDefaultApiUrl = (host: string = window.location.hostname) => {
|
||||
if (/roleypoly.com$/.test(host)) {
|
||||
if (/^roleypoly.com$/.test(host)) {
|
||||
return 'https://api-prod.roleypoly.com';
|
||||
} else if (/roleypoly\.pages\.dev$/.test(host)) {
|
||||
} else if (
|
||||
/roleypoly\.pages\.dev$/.test(host) ||
|
||||
/^stage.roleypoly.com$/.test(host)
|
||||
) {
|
||||
return 'https://api-stage.roleypoly.com';
|
||||
} else if (/\blocalhost|127\.0\.0\.1\b/.test(host)) {
|
||||
return 'http://localhost:6609';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue