diff options
author | makefu <github@syntax-fehler.de> | 2021-03-12 20:27:57 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2021-03-12 20:27:57 +0100 |
commit | cd6a3637d4ca727b0f3277e1478130a8aa1fd8c0 (patch) | |
tree | 75ce3cc5ecc25129b3ecf01cdb4c4472c32f1991 /makefu/2configs/home | |
parent | 806da70f35564c1fbc1f4f2a16c1c18cb729a5ff (diff) |
ma ham: protect application server from external requests
Diffstat (limited to 'makefu/2configs/home')
-rw-r--r-- | makefu/2configs/home/ham/nginx.nix | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/makefu/2configs/home/ham/nginx.nix b/makefu/2configs/home/ham/nginx.nix index 2048ff215..e166b2a4b 100644 --- a/makefu/2configs/home/ham/nginx.nix +++ b/makefu/2configs/home/ham/nginx.nix @@ -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; + } + ''; }; } |