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 | 01028cb07547e5388bae3d849a6f7e09961922d2 (patch) | |
tree | 5bc662c415ae62f1ef9a7659917c2cae0a78bf6b /2configs/home/ham | |
parent | 91db1f2f5c3ac0f8f450e099eb620f83fa7b579b (diff) |
ma ham: protect application server from external requests
Diffstat (limited to '2configs/home/ham')
-rw-r--r-- | 2configs/home/ham/nginx.nix | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/2configs/home/ham/nginx.nix b/2configs/home/ham/nginx.nix index 2048ff215..e166b2a4b 100644 --- a/2configs/home/ham/nginx.nix +++ b/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; + } + ''; }; } |