-
Notifications
You must be signed in to change notification settings - Fork 105
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
webpack-dev-server over HTTPS #181
Comments
@daninfpj I've success with this settings. Maybe you can try it out. In Below is part of my
Run this command for webpack domain.
Last step, set up you rails development environment. In Done. :) |
@wildjcrt you might be referring to Rails’ webpacker, I'm actually using a standalone webpack-dev-server but I think you pointed me in the right direction. This is the config that worked for me:
|
Leave an additional comment here, if you change |
@wildjcrt Thanks for your example, it almost worked for me but I found I had to use |
@njradford Ah that is a problem! I don't have access to a mixed sprockets/webpacker project to test this at the moment, but I'm guessing requests for sprockets assets are being directed to the webpack dev server. If so, I wonder if it's possible to use the contentBase configuration option to reconnect those requests to the on-disk sprockets assets? Though without a request passing through the Rails app, I guess there's nothing to trigger those assets to be (re)generated. |
Another solution could be this suggestion to use a proc for asset_host which looks rather hacky but might just be crazy enough to work. |
I'm using puma-dev to proxy to port 8080 where webpack-dev-server is running.
If I access the site at
https://domain.test
the page loads, except the webpack-dev-server connection tohttps://domain.test:8080/sockjs-node/info?t=1540932421825
which gets a ERR_CONNECTION_CLOSED. However it works athttp://domain.test:8080/sockjs-node/info?t=1540932421825
.If I run webpack-dev-server in HTTPS mode, the connection at
https://localhost:8080/sockjs-node/info?t=1540932421825
works but through puma-dev there's an error:http: proxy error: read tcp 127.0.0.1:63458->127.0.0.1:8080: read: connection reset by peer
How can I get it working with the socket connection through HTTPS?
The text was updated successfully, but these errors were encountered: