brunch / auto-reload-brunch

Adds automatic browser reloading support to brunch.
88 stars 30 forks source link

How do I run auto-reload-brunch on a secure wss rather than http #45

Closed reduxdj closed 10 years ago

reduxdj commented 10 years ago

thanks

paulmillr commented 10 years ago

we should add an option for that!

reduxdj commented 10 years ago

+1

es128 commented 10 years ago

I don't think this is all that simple. The ws instance would have to be attached to a server instance out of the https module, and users would have to config a valid cert/key pair for the domain currently being served from (localhost?), or else the websocket connection will just fail silently. Doing all this, conditionally no less, would add a lot of complexity to the plugin. Using https in a development env is not typical. Is it really not possible for you to serve from plain http during dev, @reduxdj?

And apparently the worst that happens without it is warnings, in some browsers, on a dev instance? Maybe also need to go back to refreshing manually?

-1 from me unless a simpler implementation is possible than I'm aware of.

reduxdj commented 10 years ago

Thanks for this feedback, I'll try one or the other option. Is there anyway to disable running the websocket, some fallback to not get this type of error if there's a problem? So I can continue using this in Chrome my browser of choice and not for firefox or ie, maybe make it browser vendor configurable?

SecurityError: The operation is insecure.

var connection = new WebSocket('ws://' + host + ':' + port);

vendor.js (line 14014) TypeError: parent is undefined

...ey] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototyp...

reduxdj commented 10 years ago

How do I disable this feature completely, there's no way to server our file from HTTP - we're an e-commerce site?

paulmillr commented 10 years ago

remove auto-reload-brunch from package.json

Fohlen commented 7 years ago

This is a quiet unsatisfying solution, I must say. Given that modules such as

exist, it would be as easy as