Skip to content

Commit

Permalink
fix(react): mf should consider ssl when setting remote urls #16989 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Coly010 authored Jun 23, 2023
1 parent 61faa55 commit 1891add
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

1 comment on commit 1891add

@vercel
Copy link

@vercel vercel bot commented on 1891add Jun 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-git-master-nrwl.vercel.app
nx-five.vercel.app
nx-dev-nrwl.vercel.app
nx.dev

Please sign in to comment.