Manuel83 / craftbeerpi3

Other
180 stars 169 forks source link

Add support for SSL. #249

Open mstrinzha opened 4 years ago

mstrinzha commented 4 years ago

Remove hardcoded http protocol for polling. bundle.js are using location.protocol instead of "http://" now.

fenech commented 4 years ago

Nice catch! I was struggling to get this to work behind a reverse proxy until I found this.

Since we want to just use the same protocol, domain and port as the origin, instead of:

connect(location.protocol + "//" +document.domain+":"+location.port+"/brew")

How about just simplifying to:

connect("/brew")

Cheers!