diff --git a/modules/helfi_robots_header/README.md b/modules/helfi_robots_header/README.md index a2cc10551..bb64b15a6 100644 --- a/modules/helfi_robots_header/README.md +++ b/modules/helfi_robots_header/README.md @@ -1,8 +1,3 @@ # Helfi Robots Header -Handles robots-tag header if `helfi_proxy` module can't be installed. - -This module adds `X-Robots-Tag: noindex, nofollow` to all page responses if `DRUPAL_X_ROBOTS_TAG_HEADER` if set to 1. - -**NOTE:** Because this duplicates some functionality from `helfi_proxy` module, both modules should not be enabled at the same time. - +This module is removed in favor of nginx based solution. See https://github.com/City-of-Helsinki/drupal-docker-images/blob/main/openshift/drupal/files/entrypoints/99-nginx.sh for more information. diff --git a/modules/helfi_robots_header/helfi_robots_header.install b/modules/helfi_robots_header/helfi_robots_header.install new file mode 100644 index 000000000..c9db28cca --- /dev/null +++ b/modules/helfi_robots_header/helfi_robots_header.install @@ -0,0 +1,17 @@ +uninstall(['helfi_robots_header']); +} diff --git a/modules/helfi_robots_header/helfi_robots_header.services.yml b/modules/helfi_robots_header/helfi_robots_header.services.yml deleted file mode 100644 index 79f483fc7..000000000 --- a/modules/helfi_robots_header/helfi_robots_header.services.yml +++ /dev/null @@ -1,4 +0,0 @@ -services: - Drupal\helfi_robots_header\EventSubscriber\RobotsResponseSubscriber: - tags: - - { name: event_subscriber } diff --git a/modules/helfi_robots_header/src/EventSubscriber/RobotsResponseSubscriber.php b/modules/helfi_robots_header/src/EventSubscriber/RobotsResponseSubscriber.php deleted file mode 100644 index 26f89ba91..000000000 --- a/modules/helfi_robots_header/src/EventSubscriber/RobotsResponseSubscriber.php +++ /dev/null @@ -1,40 +0,0 @@ -getResponse(); - - if ((bool) getenv(self::X_ROBOTS_TAG_HEADER_NAME)) { - $response->headers->add(['X-Robots-Tag' => 'noindex, nofollow']); - } - } - -}