-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Cannot use HTTPS to serve Module Federation Remotes #16989
Comments
Any workaround for this, I am facing the same issue https://stackoverflow.com/questions/76253660/get-http-localhost4201-remoteentry-mjs-neterr-empty-response-nx-micro-front |
could you use ssl target from webpack executor?https://nx.dev/packages/react/executors/module-federation-dev-server#ssl |
closing this issue for now |
@xiongemi Please reopen. No resolution has been provided. We are still stuck and unable to use HTTPS with Module Federation. As mentioned in my original report, we had ssl enabled as true and that works as intended. The server will start with SSL running. The issue is within Nx’s custom implementation to link remote entries file together. It has hardcore to I’m happy to provide any clarifying details, but closing this with no resolution leaves the defect. |
@xiongemi If the suggestion is to turn off SSL, our team requires it so we need it enabled. Every URL is comprised with a protocol, host, and port. Nx is only using the host and port without consideration for the protocol. This is the exact defect I’m reporting. Copied from above the Nx source code in question.
|
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. |
Current Behavior
Currently, when trying to serve a remote configured as such
the
withModuleFederation
is building mapped urls without HTTPS. That can be seen in the source code itself.This only considers the host and port, but nothing about SSL.
Expected Behavior
It is expected that if the remote serve is configured with HTTPS (
ssl: true
), the mapped remotes would also containhttps
in the outputted url.GitHub Repo
No response
Steps to Reproduce
devRemotes
main.js
in the shell pulls aremoteEntry.js
from ahttp
protocol.Nx Report
Failure Logs
No response
Operating System
Additional Information
This was working as expected in 15.3.3 and broken in 15.4.0+
Our team just upgraded past 15.3.3 recently
In 15.3.3, the code has a fallback of
//localhost
which worked great because it honored whatever the shell was doing.In 15.4.0, the code fallback was changed to
http://localhost
without capability to change http to https.The text was updated successfully, but these errors were encountered: