Get protocol from window.location for sse origin check.

For the case when sse is used with https.