mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-11 07:10:39 +02:00
chore: disable access logs for uninteresting high volume endpoint (telegraf write api), and internal nginx_status
This commit is contained in:
parent
f2a97b16c6
commit
13d9baedc1
2 changed files with 15 additions and 4 deletions
|
@ -23,7 +23,13 @@ in {
|
||||||
keepalive 2;
|
keepalive 2;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
virtualHosts.${influxdbDomain} = {
|
virtualHosts.${influxdbDomain} = let
|
||||||
|
accessRules = ''
|
||||||
|
satisfy any;
|
||||||
|
${lib.concatMapStrings (ip: "allow ${ip};\n") sentinelCfg.meta.wireguard.proxy-sentinel.server.reservedAddresses}
|
||||||
|
deny all;
|
||||||
|
'';
|
||||||
|
in {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
useACMEWildcardHost = true;
|
useACMEWildcardHost = true;
|
||||||
oauth2.enable = true;
|
oauth2.enable = true;
|
||||||
|
@ -31,10 +37,14 @@ in {
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://influxdb";
|
proxyPass = "http://influxdb";
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
|
extraConfig = accessRules;
|
||||||
|
};
|
||||||
|
locations."/api/v2/write" = {
|
||||||
|
proxyPass = "http://influxdb/api/v2/write";
|
||||||
|
proxyWebsockets = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
satisfy any;
|
${accessRules}
|
||||||
${lib.concatMapStrings (ip: "allow ${ip};\n") sentinelCfg.meta.wireguard.proxy-sentinel.server.reservedAddresses}
|
access_log off;
|
||||||
deny all;
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -152,6 +152,7 @@ in {
|
||||||
allow ::1;
|
allow ::1;
|
||||||
deny all;
|
deny all;
|
||||||
stub_status;
|
stub_status;
|
||||||
|
access_log off;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue