diff --git a/src/api-client.ts b/src/api-client.ts index 96b0408..bbfa6a6 100644 --- a/src/api-client.ts +++ b/src/api-client.ts @@ -169,7 +169,7 @@ export class APIClient { targetUrl = new URL(url, vars.apiUrl) } - const isHerokuApi = ALLOWED_HEROKU_DOMAINS.some(domain => targetUrl.hostname.endsWith(`.${domain}`)) + const isHerokuApi = ALLOWED_HEROKU_DOMAINS.some(domain => targetUrl.hostname.endsWith(`.${domain}`) || targetUrl.hostname === domain) const isLocalhost = LOCALHOST_DOMAINS.includes(targetUrl.hostname as (typeof LOCALHOST_DOMAINS)[number]) if (isHerokuApi || isLocalhost) { diff --git a/src/vars.ts b/src/vars.ts index 628b286..b87cf7d 100644 --- a/src/vars.ts +++ b/src/vars.ts @@ -77,7 +77,7 @@ export class Vars { // Remove protocol if present const cleanHost = host.replace(/^https?:\/\//, '') - return ALLOWED_HEROKU_DOMAINS.some(domain => cleanHost.endsWith(`.${domain}`)) || LOCALHOST_DOMAINS.some(domain => cleanHost.includes(domain)) + return ALLOWED_HEROKU_DOMAINS.some(domain => cleanHost.endsWith(`.${domain}`) || cleanHost === domain) || LOCALHOST_DOMAINS.some(domain => cleanHost.includes(domain)) } }