mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-24 19:39: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';
|
||||
|
||||
export const getDefaultApiUrl = memoizeOne.default((host: string) => {
|
||||
if (/^roleypoly.com$/.test(host)) {
|
||||
if (/^roleypoly\.com$/.test(host)) {
|
||||
return 'https://api-prod.roleypoly.com';
|
||||
} else if (
|
||||
/roleypoly\.pages\.dev$/.test(host) ||
|
||||
/^stage.roleypoly.com$/.test(host)
|
||||
/^stage\.roleypoly\.com$/.test(host)
|
||||
) {
|
||||
return 'https://api-stage.roleypoly.com';
|
||||
} else if (/\blocalhost|127\.0\.0\.1\b/.test(host)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue