Permalink
Browse files

fix(protocol should include final ":"): sockjs/sockjs-client#395

  • Loading branch information...
一杉
一杉 committed Jul 29, 2017
1 parent a1028ed commit f68e7283911b62e23c182df796baeb59fe8e68f9
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/location.js
  2. +1 −1 lib/main.js
View
@@ -2,7 +2,7 @@
module.exports = global.location || {
origin: 'http://localhost:80'
, protocol: 'http'
, protocol: 'http:'
, host: 'localhost'
, port: 80
, href: 'http://localhost/'
View
@@ -75,7 +75,7 @@ function SockJS(url, protocols, options) {
var secure = parsedUrl.protocol === 'https:';
// Step 2 - don't allow secure origin with an insecure protocol
if (loc.protocol === 'https' && !secure) {
if (loc.protocol === 'https:' && !secure) {
throw new Error('SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS');
}

0 comments on commit f68e728

Please sign in to comment.