Skip to content

Commit 5495a73

Browse files
committed
add X-Robots-Tag none to AssetController
1 parent 484d114 commit 5495a73

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Http/Controllers/AssetController.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ public function index(Asset $asset, ?string $locale = null)
2525
$filters = ['locale' => $locale];
2626
}
2727

28-
return $asset->getFirstMedia($asset->getAssetCollection(), $filters);
28+
return $asset
29+
->getFirstMedia($asset->getAssetCollection(), $filters)
30+
->setCustomHeaders([
31+
'X-Robots-Tag' => 'none' //equivalent to noindex, nofollow.
32+
]);
2933
}
3034
}

0 commit comments

Comments
 (0)