From 8a6706060de2c98893c44c4bb3aec5fe9bd68043 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Sun, 6 Sep 2020 23:22:42 -0700 Subject: [PATCH] Add X-Robots-Tag to service worker response for good measure --- wp-includes/class-wp-service-workers.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-includes/class-wp-service-workers.php b/wp-includes/class-wp-service-workers.php index b26f891ba..969206a40 100644 --- a/wp-includes/class-wp-service-workers.php +++ b/wp-includes/class-wp-service-workers.php @@ -113,6 +113,8 @@ public function serve_request() { */ @header( 'Cache-Control: no-cache' ); // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged, WordPress.PHP.NoSilencedErrors.Discouraged + @header( 'X-Robots-Tag: noindex, follow' ); // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged, WordPress.PHP.NoSilencedErrors.Discouraged + @header( 'Content-Type: text/javascript; charset=utf-8' ); // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged, WordPress.PHP.NoSilencedErrors.Discouraged if ( ! is_admin() ) {