Skip to content

location.procotol include final ":", and 2 line miss it #395

@imsenyu

Description

@imsenyu

from MDN:
https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/protocol

in html, protocol is usually equal to https:, http:, file: and so on.

but I found in https://github.com/sockjs/sockjs-client/blob/master/lib/main.js#L78

if (loc.protocol === 'https' && !secure) {
    throw new Error('SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS');
  }

where the final ":" is missed

Metadata

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