From 4640155fea6be4881ff9fabdd960dc60e23f4feb Mon Sep 17 00:00:00 2001 From: Suchi Garg Date: Thu, 4 Apr 2019 18:00:28 +1100 Subject: [PATCH 1/2] [GOVCMSD8-143] Fixing the script to disallow all in robots.txt for non-prod environments. --- .docker/images/nginx/no-robots.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.docker/images/nginx/no-robots.sh b/.docker/images/nginx/no-robots.sh index 04384f0e..714c2ee2 100644 --- a/.docker/images/nginx/no-robots.sh +++ b/.docker/images/nginx/no-robots.sh @@ -4,5 +4,5 @@ # if [ ! "${LAGOON_ENVIRONMENT_TYPE}" == "production" ]; then - printf "User-agent: *\nDisallow: /\n" > /app/robots.txt + printf "User-agent: *\nDisallow: /\n" > /app/web/robots.txt fi From ea04a1fae8c0926c8450ab81b7e28c4cf645e6ec Mon Sep 17 00:00:00 2001 From: Karl Hepworth Date: Wed, 8 May 2019 15:43:45 +1000 Subject: [PATCH 2/2] Update sanitisation task to correctly identify robots.txt robots.txt is now marked as present as of 99749424e3f5984ab1dc1399ff2a9c0e5fa4ed0e --- tests/goss/goss.nginx-drupal.yaml | 4 ++++ tests/goss/sanitise.yaml | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/goss/goss.nginx-drupal.yaml b/tests/goss/goss.nginx-drupal.yaml index 6e7e60b1..751cc51c 100644 --- a/tests/goss/goss.nginx-drupal.yaml +++ b/tests/goss/goss.nginx-drupal.yaml @@ -1,3 +1,7 @@ --- gossfile: sanitise.yaml: {} + +file: + /app/web/robots.txt: + exists: true diff --git a/tests/goss/sanitise.yaml b/tests/goss/sanitise.yaml index bad20f92..09ecea77 100644 --- a/tests/goss/sanitise.yaml +++ b/tests/goss/sanitise.yaml @@ -24,8 +24,6 @@ file: exists: false /app/web/web.config: exists: false - /app/web/robots.txt: - exists: false /app/web/.editorconfig: exists: false /app/web/favicon.ico: