Skip to content

Commit

Permalink
Allow --api-location to contact external hostnames
Browse files Browse the repository at this point in the history
  • Loading branch information
Jérémy VIGNELLES committed Jan 25, 2022
1 parent f2ec90a commit c7df071
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,5 +186,5 @@ export function IS_API_DEV_SERVER() {
return isHttpUrl(SWA_CLI_API_LOCATION);
}
export function SWA_CLI_API_URI() {
return address(SWA_CLI_HOST, process.env.SWA_CLI_API_PORT);
return IS_API_DEV_SERVER() ? SWA_CLI_API_LOCATION : address(SWA_CLI_HOST, process.env.SWA_CLI_API_PORT);
}

0 comments on commit c7df071

Please sign in to comment.