mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-25 03:49:11 +00:00
fix(web): better define stage url matcher to prevent unexpected use-cases :)
This commit is contained in:
parent
2b467b8452
commit
ed82a67594
1 changed files with 2 additions and 2 deletions
|
@ -1,11 +1,11 @@
|
||||||
import * as memoizeOne from 'memoize-one';
|
import * as memoizeOne from 'memoize-one';
|
||||||
|
|
||||||
export const getDefaultApiUrl = memoizeOne.default((host: string) => {
|
export const getDefaultApiUrl = memoizeOne.default((host: string) => {
|
||||||
if (/^roleypoly.com$/.test(host)) {
|
if (/^roleypoly\.com$/.test(host)) {
|
||||||
return 'https://api-prod.roleypoly.com';
|
return 'https://api-prod.roleypoly.com';
|
||||||
} else if (
|
} else if (
|
||||||
/roleypoly\.pages\.dev$/.test(host) ||
|
/roleypoly\.pages\.dev$/.test(host) ||
|
||||||
/^stage.roleypoly.com$/.test(host)
|
/^stage\.roleypoly\.com$/.test(host)
|
||||||
) {
|
) {
|
||||||
return 'https://api-stage.roleypoly.com';
|
return 'https://api-stage.roleypoly.com';
|
||||||
} else if (/\blocalhost|127\.0\.0\.1\b/.test(host)) {
|
} else if (/\blocalhost|127\.0\.0\.1\b/.test(host)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue