httpd: Add option for specifying robots.txt

This commit is contained in:
Eelco Dolstra
2014-09-18 19:05:26 +02:00
parent 837a0c05e5
commit 0de982d75b
2 changed files with 16 additions and 5 deletions
@@ -209,10 +209,11 @@ let
'';
robotsTxt =
concatStringsSep "\n" (
concatStringsSep "\n" (filter (x: x != "") (
# If this is a vhost, the include the entries for the main server as well.
(if isMainServer then [] else map (svc: svc.robotsEntries) mainSubservices)
++ (map (svc: svc.robotsEntries) subservices));
(if isMainServer then [] else [mainCfg.robotsEntries] ++ map (svc: svc.robotsEntries) mainSubservices)
++ [cfg.robotsEntries]
++ (map (svc: svc.robotsEntries) subservices)));
in ''
ServerName ${serverInfo.canonicalName}