fix(web): better define stage url matcher to prevent unexpected use-cases :)

This commit is contained in:
41666 2021-03-13 05:57:33 -05:00
parent 2b467b8452
commit ed82a67594

View file

@ -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)) {