mirror of
https://github.com/srid/ema.git
synced 2024-11-29 09:25:14 +03:00
Use secure websocket on HTTPS (#46)
This commit is contained in:
parent
63162f126b
commit
52f47d4b19
@ -8,6 +8,7 @@
|
||||
- Handle invalid routes gracefully without breaking websocket
|
||||
- Re-add `<script>` tags on hot reload
|
||||
- Scroll to top on route switches
|
||||
- Use secure websockets when on HTTPS
|
||||
- `Asset` type
|
||||
- Introduce the `Asset` type to distinguishing between static files and generated files. The later can be one of `Html` or `Other`, allowing the live server to handle them sensibly.
|
||||
- `Ema` typeclass:
|
||||
|
@ -245,7 +245,8 @@ wsClientShim =
|
||||
window.connecting();
|
||||
// The route current DOM is displaying
|
||||
var routeVisible = document.location.pathname;
|
||||
var ws = new WebSocket("ws://" + window.location.host);
|
||||
var wsProto = (window.location.protocol === "https:") && "wss://" || "ws://";
|
||||
var ws = new WebSocket(wsProto + window.location.host);
|
||||
|
||||
// Call this, then the server will send update *once*. Call again for
|
||||
// continous monitoring.
|
||||
|
Loading…
Reference in New Issue
Block a user