Merge pull request #3780 from ip1981/master

Fixed rewrite rules for Mediawiki

+4
+3
lib/strings.nix
··· 34 34 concatStringsSep = separator: list: 35 35 concatStrings (intersperse separator list); 36 36 37 + concatMapStringsSep = sep: f: list: concatStringsSep sep (map f list); 38 + concatImapStringsSep = sep: f: list: concatStringsSep sep (lib.imap f list); 39 + 37 40 38 41 # Construct a Unix-style search path consisting of each `subDir" 39 42 # directory of the given list of packages. For example,
+1
nixos/modules/services/web-servers/apache-httpd/mediawiki.nix
··· 133 133 RewriteEngine On 134 134 RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f 135 135 RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d 136 + ${concatMapStringsSep "\n" (u: "RewriteCond %{REQUEST_URI} !^${u.urlPath}") serverInfo.serverConfig.servedDirs} 136 137 RewriteRule ${if config.enableUploads 137 138 then "!^/images" 138 139 else "^.*\$"