Consider localhost connections secure
This commit is contained in:
parent
1ce2792fc4
commit
dc6252d3f6
@ -111,8 +111,11 @@ Network.prototype.getNetworkStatus = function() {
|
|||||||
const transport = this.irc.connection.transport;
|
const transport = this.irc.connection.transport;
|
||||||
|
|
||||||
if (transport.socket) {
|
if (transport.socket) {
|
||||||
|
const isLocalhost = transport.socket.remoteAddress === "127.0.0.1";
|
||||||
|
const isAuthorized = transport.socket.encrypted && transport.socket.authorized;
|
||||||
|
|
||||||
status.connected = transport.isConnected();
|
status.connected = transport.isConnected();
|
||||||
status.secure = (transport.socket.encrypted && transport.socket.authorized) || false;
|
status.secure = isAuthorized || isLocalhost;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user