Removed public hostname

This commit is contained in:
2026-08-28 03:42:13 +02:00
parent 2ca2bafd61
commit 67215c4af0
2 changed files with 2 additions and 6 deletions
+2 -3
View File
@@ -48,11 +48,10 @@ impl UserConnections {
return Err(anyhow::anyhow!("Client tampstamp wasn't correct"));
}
if hostname != server.config.public_hostname || !server.config.hostnames.contains(&hostname)
{
if !server.config.hostnames.contains(&hostname) {
socket.send(
&ClientMethod::Error {
error: Cow::Owned(format!("Invalid Hostname, to avoid man-in-the-middle attacks, please use the correct hostname: {}", server.config.public_hostname)),
error: Cow::Owned(format!("Invalid Hostname, to avoid man-in-the-middle attacks, please use the correct hostname(s): {}", server.config.hostnames.clone().into_iter().collect::<Vec<_>>().join(", "))),
},
)
.await?;