File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ export class APIClient {
169169 targetUrl = new URL ( url , vars . apiUrl )
170170 }
171171
172- const isHerokuApi = ALLOWED_HEROKU_DOMAINS . some ( domain => targetUrl . hostname . endsWith ( `.${ domain } ` ) )
172+ const isHerokuApi = ALLOWED_HEROKU_DOMAINS . some ( domain => targetUrl . hostname . endsWith ( `.${ domain } ` ) || targetUrl . hostname === domain )
173173 const isLocalhost = LOCALHOST_DOMAINS . includes ( targetUrl . hostname as ( typeof LOCALHOST_DOMAINS ) [ number ] )
174174
175175 if ( isHerokuApi || isLocalhost ) {
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ export class Vars {
7777 // Remove protocol if present
7878 const cleanHost = host . replace ( / ^ h t t p s ? : \/ \/ / , '' )
7979
80- return ALLOWED_HEROKU_DOMAINS . some ( domain => cleanHost . endsWith ( `.${ domain } ` ) ) || LOCALHOST_DOMAINS . some ( domain => cleanHost . includes ( domain ) )
80+ return ALLOWED_HEROKU_DOMAINS . some ( domain => cleanHost . endsWith ( `.${ domain } ` ) || cleanHost === domain ) || LOCALHOST_DOMAINS . some ( domain => cleanHost . includes ( domain ) )
8181 }
8282}
8383
You can’t perform that action at this time.
0 commit comments