Merge pull request #57596 from artemist/nginx-return
nixos/nginx: add return option to location
This commit is contained in:
commit
0e57b98b2c
|
@ -276,6 +276,7 @@ let
|
||||||
${optionalString (config.tryFiles != null) "try_files ${config.tryFiles};"}
|
${optionalString (config.tryFiles != null) "try_files ${config.tryFiles};"}
|
||||||
${optionalString (config.root != null) "root ${config.root};"}
|
${optionalString (config.root != null) "root ${config.root};"}
|
||||||
${optionalString (config.alias != null) "alias ${config.alias};"}
|
${optionalString (config.alias != null) "alias ${config.alias};"}
|
||||||
|
${optionalString (config.return != null) "return ${config.return};"}
|
||||||
${config.extraConfig}
|
${config.extraConfig}
|
||||||
${optionalString (config.proxyPass != null && cfg.recommendedProxySettings) "include ${recommendedProxyConfig};"}
|
${optionalString (config.proxyPass != null && cfg.recommendedProxySettings) "include ${recommendedProxyConfig};"}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,6 +64,15 @@ with lib;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
return = mkOption {
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
default = null;
|
||||||
|
example = "301 http://example.com$request_uri;";
|
||||||
|
description = ''
|
||||||
|
Adds a return directive, for e.g. redirections.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
|
|
Loading…
Reference in New Issue