Skip to content

Allow for secure websockets #24

Open
@domenukk

Description

The current implementation of treema has ws:// built in for websockets, however this fails for all browsers but Chrome when displaying a HTTPS page.
On HTTPS, we want to use wss:// as protocol instead.
We could use something like

if ("https:" == document.location.protocol) {
    /* secure */
} else {
    /* unsecure */
}

as seen in:
http://stackoverflow.com/questions/282444/how-can-i-use-javascript-on-the-client-side-to-detect-if-the-page-was-encrypted
or pass the option in as a parameter (firebase seems to go that path).
/edit: It seems firebase is also parsing the url, just somewhere else

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions