-
Notifications
You must be signed in to change notification settings - Fork 48
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
How can I make this work for https secured server? #143
Comments
For a quick glance we might have to implement a proxy to handle the |
IF you are running a NodeJs https server already, which supports middleware:
IF you are trying to run reload as the HTTPS server
Good luck! |
If a concern exists of the wss protocol being secured, it's secured by nature regradless as answered here: https://stackoverflow.com/questions/26791107/wss-on-http-vs-wss-on-https So its just a matter of supplying the httpsOptions and doing |
Thanks for the info. I was just attempting to integrate this reload module to an existing app that requires https in production and found out it won't work. It tested ok in development http mode. |
Try ack-reload with the middleware. It's a fork of this package and works quite the same (see benefits-of-ack-reload-over-original-reload-package) Since you already have an https NodeJs app, all you need to do is give ack-reload's middleware the request/response objects and the rest will work like magic. Let me know Another middleware example on ack-reload package: https://www.npmjs.com/package/ack-reload#express-example |
Reload used to attach the WebSocket server to the node server but it no longer does that. It creates it's own server to run on it's own port so it doesn't hijack the node server, hence why we might need to consider a proxy or some other solution. Also, @AckerApple this is your final warning please stop using these issues to advertise your fork. If you have something to contribute on possible solutions, ideas, etc. that help our project we welcome them. But do no use these threads to continuously inhibit our productivity with fork advertising, project/user bashing, and solutions that only involve your fork. Feel free to reach out to these users via other methods to discuss your fork. |
You got it. I'm outty 500 and unsubscribed. Good luck and fare well |
Hi! Do you have a planned date for releasing the next version? Not being able to use reload on https projects is a real bummer. Is there a temporary fix we can use to bypass this issue? I've tried loading reload.js through http, but it checks window.location.protocol for https instead of document.currentScript. |
@meszaros-lajos-gyorgy the next version is going to be released really soon. You're welcome to give it a try and provide any issues/feedback. |
Do you have a snapshot version of 3.0.0 released to npm, or should I build it locally from the github repo? |
You should build it locally from GitHub |
I'm gonna go with |
I have the same error: |
Yes you do, consult the README on that branch |
Works like a charm! |
Perfect! I appreciate the feedback!! |
I tested it using http is seems ok, then I switched to https server and is having WebSocket connection to 'wss://localhost:9856/' failed: Error in connection establishment: net::ERR_CONNECTION_CLOSED
Is there some special steps I need for https server? Any tested example? Thanks.
The text was updated successfully, but these errors were encountered: