Skip to content

Commit

Permalink
Merge pull request #330 from GoogleChromeLabs/add/x-robots-tag
Browse files Browse the repository at this point in the history
Add X-Robots-Tag to service worker response for good measure
  • Loading branch information
westonruter authored Sep 7, 2020
2 parents 4db791e + 8a67060 commit cf19aff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions wp-includes/class-wp-service-workers.php
Original file line number Diff line number Diff line change
Expand Up @@ -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() ) {
Expand Down

0 comments on commit cf19aff

Please sign in to comment.