What would be the best way to add custom http headers to a platform used only for development?

Here (http://omega8.cc/how-to-use-robotstxt-properly-243) it states that the robots.txt file will be deleted from platform root and installing the robotstxt module for every site seems like extra work/maintenance even via an install profile. And for various reasons the robots.txt file is not sufficient for preventing a site from showing up on search results.

Adding this:

location = /index.php {
  add_header X-Robots-Tag "noindex, nofollow";      
}

... in /data/disk/o1/config/includes/nginx_octopus_include.conf works, but what would be the best way to make it platform specific?

What exactly should be added to:

/data/disk/o1/config/server_master/nginx/post.d/nginx_force_include.myplatform

or is there a recommended way to add a custom http header for a platform?

Comments

omega8cc’s picture

Status: Active » Closed (works as designed)

Any site with dev. or devel. in its name will not get indexed by any known robot/crawler, because BOA system will redirect them to the aegirproject.org domain. So using dev. or devel. in the domain name gives you some per-site protection. To make it per platform, you could add a similar code and/or add any header in the /data/conf/override.global.inc file, but based on the $_SERVER['DOCUMENT_ROOT'] regex match, like we do here for other reasons.

omega8cc’s picture

Issue summary: View changes

formatting