ma ham: protect application server from external requests

This commit is contained in:
makefu 2021-03-12 20:27:57 +01:00
parent 91db1f2f5c
commit 01028cb075

View file

@ -6,5 +6,10 @@ in {
serverAliases = [ "hass.lan" "ha" "ha.lan" ];
locations."/".proxyPass = "http://localhost:8123";
locations."/".proxyWebsockets = true;
extraConfig = ''
if ( $server_addr != "${internal-ip}" ) {
return 403;
}
'';
};
}