Skip to content

Commit

Permalink
fix(react): mf should consider ssl when setting remote urls nrwl#16989 (
Browse files Browse the repository at this point in the history
  • Loading branch information
Coly010 authored and meeroslav committed Jun 23, 2023
1 parent 27616e6 commit 4db3283
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/angular/src/utils/mf/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ export function getFunctionDeterminateRemoteUrl(isServer: boolean = false) {
);
}

const host = serveTarget.options?.host ?? 'http://localhost';
const host =
serveTarget.options?.host ??
`http${serveTarget.options.ssl ? 's' : ''}://localhost`;
const port = serveTarget.options?.port ?? 4201;
return `${
host.endsWith('/') ? host.slice(0, -1) : host
Expand Down
4 changes: 3 additions & 1 deletion packages/react/src/module-federation/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ export function getFunctionDeterminateRemoteUrl(isServer: boolean = false) {
);
}

const host = serveTarget.options?.host ?? 'http://localhost';
const host =
serveTarget.options?.host ??
`http${serveTarget.options.ssl ? 's' : ''}://localhost`;
const port = serveTarget.options?.port ?? 4201;
return `${
host.endsWith('/') ? host.slice(0, -1) : host
Expand Down

0 comments on commit 4db3283

Please sign in to comment.