ma ham: protect application server from external requests

This commit is contained in:
makefu 2021-03-12 20:27:57 +01:00
parent 806da70f35
commit cd6a3637d4
No known key found for this signature in database
GPG Key ID: 36F7711F3FC0F225

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;
}
'';
};
}