feat(server): restrict private services to LAN and WireGuard CIDRs

This commit is contained in:
Bryan Ramos 2026-04-12 20:37:31 -04:00
parent b58906f0e5
commit 2bab2759e6
5 changed files with 31 additions and 0 deletions

View file

@ -6,6 +6,7 @@ let
nginx = config.modules.system.nginx;
domain = "ramos.codes";
port = 2283;
privateAccessRules = concatMapStringsSep "\n" (cidr: "allow ${cidr};") nginx.privateAllowCidrs + "\ndeny all;";
in
{
@ -51,6 +52,7 @@ in
locations."/" = {
proxyPass = "http://127.0.0.1:${toString port}";
proxyWebsockets = true;
extraConfig = privateAccessRules;
};
};
};