Added concatMapStringsSep and concatImapStringsSep
Example: configure rewrite rules for Mediawiki
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
${concatMapStringsSep "\n" (u: "RewriteCond %{REQUEST_URI} !^${u.urlPath}") serverInfo.serverConfig.servedDirs}
RewriteRule ${if config.enableUploads
This commit is contained in:
@@ -34,6 +34,9 @@ rec {
|
|||||||
concatStringsSep = separator: list:
|
concatStringsSep = separator: list:
|
||||||
concatStrings (intersperse separator list);
|
concatStrings (intersperse separator list);
|
||||||
|
|
||||||
|
concatMapStringsSep = sep: f: list: concatStringsSep sep (map f list);
|
||||||
|
concatImapStringsSep = sep: f: list: concatStringsSep sep (lib.imap f list);
|
||||||
|
|
||||||
|
|
||||||
# Construct a Unix-style search path consisting of each `subDir"
|
# Construct a Unix-style search path consisting of each `subDir"
|
||||||
# directory of the given list of packages. For example,
|
# directory of the given list of packages. For example,
|
||||||
|
|||||||
Reference in New Issue
Block a user