cosmos / cosmjs

The Swiss Army knife to power JavaScript based client solutions ranging from Web apps/explorers over browser extensions to server-side clients like faucets/scrapers.
https://cosmos.github.io/cosmjs/
Apache License 2.0
635 stars 328 forks source link

Require protocol to be set in endpoint URLs #1527

Closed webmaster128 closed 7 months ago

webmaster128 commented 7 months ago

In an app I am running into errors like this:

_app-XXXXXXX.js:1 Mixed Content: The page at '' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://websocket/'. This request has been blocked; this endpoint must be available over WSS.

This is very confusing since no wwebsocket connection is used here. "ws://websocket/" probably just means the RPC string was empty and "ws://" was prepended and "websocket/" was appended.

It should not be too much to ask the app developer to always include the protocol in the URLs.