Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

HSC-1010: support WebSocket over TLS #698

Merged
merged 1 commit into from Sep 20, 2016
Merged

Conversation

julbra
Copy link
Contributor

@julbra julbra commented Sep 16, 2016

Unfortunately with this it now doesn't work through gulp because of the port. Trying to get gulp with browser-sync to proxy WS requests took me a whole day and I failed because of various bugs.
I tried with http-proxy-middleware which was the most promising library but it failed
See mainly: chimurai/http-proxy-middleware#15

@nwmac
Copy link
Contributor

nwmac commented Sep 18, 2016

I think you need to check the port - if the default of 80 or 443 is used, I think port will be empty, so you will end up adding a colon into the URL at the end - think you need to check if port is non-empty and only add if that is true.

i.e. if the URL is https://stackato.helion.space

the port will be empty, so I think, as is, the URL you will derive for web sockets would be:

wss://stackato.helion.space : /pp/v1

@julbra
Copy link
Contributor Author

julbra commented Sep 19, 2016

@nwmac I'm pretty sure $location does the right thing and returns the port in all scenarios.
Yep port 80 is actually the example in the docs:

// given URL http://example.com/#/some/path?foo=bar&baz=xoxo
var port = $location.port();
// => 80

@nwmac
Copy link
Contributor

nwmac commented Sep 20, 2016

thanks for checking - LGTM

@julbra julbra merged commit 1b86f04 into master Sep 20, 2016
@julbra julbra deleted the 1010-https-log-stream branch September 20, 2016 15:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants