nginx: block all /metrics
endpoints
This commit is contained in:
parent
cad1ac566a
commit
d6be5fefea
1 changed files with 50 additions and 39 deletions
|
@ -10,6 +10,16 @@ let
|
||||||
-out "$out/ca.pem" -keyout "$out/ca.key"
|
-out "$out/ca.pem" -keyout "$out/ca.key"
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
|
# block all /metrics endpoints
|
||||||
|
options.services.nginx.virtualHosts = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf (lib.types.submodule {
|
||||||
|
config.locations."/metrics" = lib.mkDefault {
|
||||||
|
extraConfig = "deny all;";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
@ -52,5 +62,6 @@ in {
|
||||||
allowedTCPPorts = [80 443];
|
allowedTCPPorts = [80 443];
|
||||||
allowedUDPPorts = [443];
|
allowedUDPPorts = [443];
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue