feat(nixos): configure route body limits

This commit was merged in pull request #136.
This commit is contained in:
2026-10-06 22:54:58 -04:00
parent 8d357e960b
commit 46a47fa061
3 changed files with 17 additions and 0 deletions

View File

@@ -29,6 +29,12 @@
);
message = "UDP routes must set ports and not port.";
}
{
assertion =
entries:
lib.all (entry: entry.value.protocol != "udp" || entry.value.clientMaxBodySize == null) entries;
message = "UDP routes must not set clientMaxBodySize.";
}
];
type = lib.types.submodule {
@@ -64,6 +70,13 @@
];
description = "Sets the UDP ports for a UDP route.";
};
clientMaxBodySize = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
example = "1g";
description = "Maximum HTTP request body the reverse proxy accepts.";
};
};
};
}