From 011c1632f3762e1bc1ecfdee9d9f3b3f44be74e5 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Sun, 12 Nov 2023 17:50:43 +0300 Subject: 2023-11-12 --- modules/nixos/nginx.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'modules/nixos/nginx.nix') diff --git a/modules/nixos/nginx.nix b/modules/nixos/nginx.nix index 9ca6936..05c6a06 100644 --- a/modules/nixos/nginx.nix +++ b/modules/nixos/nginx.nix @@ -25,6 +25,23 @@ in { }; config = mkIf cfg.enable { + _module.args.libNginx.config = { + internalOnly = '' + if ($internal != 1) { + return 403; + } + access_log off; + ''; + appendHead = text: '' + sub_filter '' '${lib.concatStrings text}'; + sub_filter_once on; + ''; + noProxyBuffering = '' + proxy_buffering off; + proxy_cache off; + ''; + }; + services = { nginx = { enable = true; -- cgit v1.2.3