Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxies for dynamic remotes do not support SSL #27360

Closed
1 of 4 tasks
sknoslo opened this issue Aug 9, 2024 · 1 comment · Fixed by #27381
Closed
1 of 4 tasks

Proxies for dynamic remotes do not support SSL #27360

sknoslo opened this issue Aug 9, 2024 · 1 comment · Fixed by #27381

Comments

@sknoslo
Copy link

sknoslo commented Aug 9, 2024

Current Behavior

I have an application that uses dynamic federation, and loading remotes does not work with SSL enabled during development.

#26782 introduced this new proxy for remotes to static servers, which works great, but it just doesn't take into account SSL at all.

Expected Behavior

An application that uses dynamic federation can use SSL during development.

GitHub Repo

https://github.com/sknoslo/ng-mf-ssl

Steps to Reproduce

  1. Start the app with nx serve host
  2. Navigate to https://localhost:4200/todo to load the todo app, you'll see the connection refused in the network devtools

Nx Report

Node           : 20.16.0
OS             : win32-x64
Native Target  : x86_64-windows
npm            : 10.8.1

nx                 : 19.5.7
@nx/js             : 19.5.7
@nx/jest           : 19.5.7
@nx/linter         : 19.5.7
@nx/eslint         : 19.5.7
@nx/workspace      : 19.5.7
@nx/angular        : 19.5.7
@nx/devkit         : 19.5.7
@nx/eslint-plugin  : 19.5.7
@nrwl/tao          : 19.5.7
@nx/web            : 19.5.7
@nx/webpack        : 19.5.7
typescript         : 5.5.4

Failure Logs

No response

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

I was able to patch startRemoteProxies to start an https server if SSL is configured for a remote, and this solves the issue. I also attempted to only serve the host with SSL, and not the remotes, but the static server itself is still started with SSL and the proxies fail to verify the secure connection because it is a self signed certificate. In the http-proxy-middleware config, I had to set secure: false to get around that.

Coly010 added a commit that referenced this issue Aug 12, 2024

Verified

This commit was signed with the committer’s verified signature.
thaJeztah Sebastiaan van Stijn
…configured with ssl #27360
Coly010 added a commit that referenced this issue Aug 12, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…configured with ssl #27360
Coly010 added a commit that referenced this issue Aug 12, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…configured with ssl #27360 (#27381)

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->
When the host uses SSL, the remote proxies are not created on a secure
server.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
When the host uses SSL, the remote proxies should be created on a secure
server

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #27360
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants