Skip to content
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

Allow for secure websockets #24

Open
domenukk opened this issue May 5, 2014 · 0 comments
Open

Allow for secure websockets #24

domenukk opened this issue May 5, 2014 · 0 comments

Comments

@domenukk
Copy link

domenukk commented May 5, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant