nginx module: Add extraConfig for locations

This commit is contained in:
Franz Pletz 2016-02-10 16:02:38 +01:00 committed by Robin Gloster
parent d5a097fdb6
commit 811f243ce6
2 changed files with 9 additions and 0 deletions

View File

@ -117,6 +117,7 @@ let
location ${location} {
${optionalString (config.proxyPass != null) "proxy_pass ${config.proxyPass};"}
${optionalString (config.root != null) "root ${config.root};"}
${config.extraConfig}
}
'') locations);
in

View File

@ -27,6 +27,14 @@ with lib;
Root directory for requests.
'';
};
extraConfig = mkOption {
type = types.lines;
default = "";
description = ''
These lines go to the end of the location verbatim.
'';
};
};
}