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:
parent
5d090a32bd
commit
38644cc57f
@ -101,6 +101,12 @@ with lib;
|
|||||||
default = "";
|
default = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
recommendedProxySettings = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = "Force the use of recommended proxy configuration.";
|
||||||
|
};
|
||||||
|
|
||||||
allowWAN = mkOption {
|
allowWAN = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
@ -128,6 +134,7 @@ with lib;
|
|||||||
(path: location: {
|
(path: location: {
|
||||||
proxyPass = "http://${location.host}:${toString location.port}${location.path}";
|
proxyPass = "http://${location.host}:${toString location.port}${location.path}";
|
||||||
proxyWebsockets = location.proxyWebsockets;
|
proxyWebsockets = location.proxyWebsockets;
|
||||||
|
recommendedProxySettings = location.recommendedProxySettings;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
${concatMapStringsSep "\n" (allowCIDR: "allow ${allowCIDR};") location.allow}
|
${concatMapStringsSep "\n" (allowCIDR: "allow ${allowCIDR};") location.allow}
|
||||||
${optionalString location.allowLan ''allow ${config.architect.networks."lan".net};''}
|
${optionalString location.allowLan ''allow ${config.architect.networks."lan".net};''}
|
||||||
|
Loading…
Reference in New Issue
Block a user