No connection to ioBroker when admin is using https
I wanted to have a look into the node-red adapter and installed it from stable repo. Version 5.x did not work at all complaining about an undefined util.log function and went into a restart-loop.
After installing the newest version 6.0.1 i got the adapter running and got access to the node-red webinterface. Unfortunately I am not able to access the iobroker object tree when configuring the nodes. When i click on the button next to the topic-field, nothing happens. On the developer-console of my browser i get the following message:
The page at 'https://192.168.1.11:8079/#flow/4568c66082a20b69' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://192.168.1.11:8081/?sid=1733429532375&name=node-red'. This request has been blocked; this endpoint must be available over WSS.
I noticed that allthough i've defined node-red and the admin-interface to use https, the websocket-endpoint is reported as ws:// instead of 'wss://'.
This seems to happen, as in line 95 of #src-object-selector/public/socket.iob.js the url used to create the socket is set prioritizing the _url-parameter (which starts with http) over the window.href.location (which has the needed https-prefix as i access the webinterface via https). As a quick and dirty hack for my case i hardcoded the wss in line 128. Alternatively you could modify line 95 to always take the window.href.location as the url. As i assume there was a reason for that conditional expression opened this issue to inform you about this bug discuss a proper fix for this.
You should understand, that it is not possible to establish insecure socket connection from HTTPS to WS.
So it i not possible to communicate from HTTPS/node-red to ws/admin.
In this case the value of _url is right.
You case could be solved just be restarting of node-red, as node-red reads only at start where to find the admin.
Now the node-red will be restarted automatically if admin settings changed