From 4bbbfe9ed1616495e1847cf71b95434361b4ef79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Sat, 20 Jan 2024 14:49:58 +0200 Subject: [PATCH] 11sync.net: block /admin --- flake.lock | 8 ++++---- hosts/fra1-a/configuration.nix | 7 +++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index d590088..848842f 100644 --- a/flake.lock +++ b/flake.lock @@ -71,11 +71,11 @@ ] }, "locked": { - "lastModified": 1705754139, - "narHash": "sha256-cG444HFP/t27diJsRo7clqzzXhhaN3GpGG5GuorM+jk=", + "lastModified": 1705754864, + "narHash": "sha256-v7xVmq/7FKhWuesUOKi4dlU7wJ7mqDUQPcaCwWXginQ=", "ref": "refs/heads/main", - "rev": "7d6143a83230298e85c45283435f702dd359e8c7", - "revCount": 135, + "rev": "ce0521ef779dae7ced8fb3a45cbb2e81d8a189f3", + "revCount": 136, "type": "git", "url": "https://git.jakstys.lt/motiejus/e11sync" }, diff --git a/hosts/fra1-a/configuration.nix b/hosts/fra1-a/configuration.nix index e92fbc8..4c26d20 100644 --- a/hosts/fra1-a/configuration.nix +++ b/hosts/fra1-a/configuration.nix @@ -1,4 +1,5 @@ { + lib, config, pkgs, myData, @@ -96,6 +97,12 @@ "www.11sync.net".extraConfig = '' redir https://11sync.net ''; + "11sync.net".extraConfig = lib.mkForce '' + respond /admin/* "Access denied" 403 { + close + } + ${builtins.readFile "${pkgs.e11sync-caddyfile}"} + ''; "http://admin.11sync.net".extraConfig = '' @denied not remote_ip ${myData.subnets.tailscale.cidr}