mirror of
https://github.com/thelounge/thelounge
synced 2024-11-15 08:47:16 +00:00
Consider localhost connections secure
This commit is contained in:
parent
1ce2792fc4
commit
dc6252d3f6
1 changed files with 4 additions and 1 deletions
|
@ -111,8 +111,11 @@ Network.prototype.getNetworkStatus = function() {
|
|||
const transport = this.irc.connection.transport;
|
||||
|
||||
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.secure = (transport.socket.encrypted && transport.socket.authorized) || false;
|
||||
status.secure = isAuthorized || isLocalhost;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue