nixos/nginx: add return option to location
This commit is contained in:
parent
54258e459f
commit
fee854ed01
@ -276,6 +276,7 @@ let
|
||||
${optionalString (config.tryFiles != null) "try_files ${config.tryFiles};"}
|
||||
${optionalString (config.root != null) "root ${config.root};"}
|
||||
${optionalString (config.alias != null) "alias ${config.alias};"}
|
||||
${optionalString (config.return != null) "return ${config.return};"}
|
||||
${config.extraConfig}
|
||||
${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 {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
|
Loading…
Reference in New Issue
Block a user