feat(architect/options.nix): add recommendedProxySettings option

- Introduced `recommendedProxySettings` to force the use of recommended proxy configuration.
- Updated location configuration to include `recommendedProxySettings`.
This commit is contained in:
Giulio De Pasquale 2024-11-17 20:31:13 +00:00
parent 5d090a32bd
commit 38644cc57f

View File

@ -101,6 +101,12 @@ with lib;
default = "";
};
recommendedProxySettings = mkOption {
type = types.bool;
default = true;
description = "Force the use of recommended proxy configuration.";
};
allowWAN = mkOption {
type = types.bool;
default = false;
@ -128,6 +134,7 @@ with lib;
(path: location: {
proxyPass = "http://${location.host}:${toString location.port}${location.path}";
proxyWebsockets = location.proxyWebsockets;
recommendedProxySettings = location.recommendedProxySettings;
extraConfig = ''
${concatMapStringsSep "\n" (allowCIDR: "allow ${allowCIDR};") location.allow}
${optionalString location.allowLan ''allow ${config.architect.networks."lan".net};''}