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
feat(react): add proxy config support to file-server executor #9225
feat(react): add proxy config support to file-server executor #9225
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/nrwl/nx-dev/BwNCHmNeSecT4PeWWdJjdC5kn74H [Deployment for 5015907 canceled] |
c6c794d
to
98dae05
Compare
98dae05
to
7b53a53
Compare
7b53a53
to
94e406f
Compare
94e406f
to
18438ac
Compare
18438ac
to
5015907
Compare
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
The
file-server
executor uses thehttp-server
library under the hood.http-server
useshttp-proxy
under the hood, when handling things like custom SSL certificates.Currently, when supplying your own SSL certificate (using
ssl
,sslKey
,sslCert
andproxyUrl
options) with a single-page-app that handles its own routing, http-server will not correctly route paths back to the SPA. As a result, directly visiting paths like/user/login
will fail with an authentication error.In other words: When serving a SPA using custom SSL certificates, directly visiting url paths other than
/
results in an authentication error response from the server.The reason for this issue is because the underlying
http-proxy
isn't configured to correctly handle the custom SSL certificates. Currently it cannot be correctly configured, because this executor does not support accepting configuration settings for thehttp-proxy
. Specifically, it does not support the--proxyOptions
argument inhttp-proxy
.Expected Behavior
When serving a SPA using custom SSL certificates, directly visiting url paths will now work correctly, given the settings are correct.
Example settings that work:
Related Issue(s)
🤷🏻♀️
Fixes #
🤷🏻♀️