SEO additions index now

This commit is contained in:
Mark Gregory
2026-10-06 15:15:53 +01:00
parent 93f640b6bc
commit b3ca947d7d
6 changed files with 160 additions and 2 deletions
+12
View File
@@ -37,6 +37,18 @@ final class SeoController extends Controller
->header('Cache-Control', 'public, max-age=3600');
}
public function indexNowKey(string $key): Response
{
$configured = trim((string) config('indexnow.key'));
abort_unless(config('indexnow.enabled') && $configured !== '' && hash_equals($configured, $key), 404);
return response($configured, 200, [
'Content-Type' => 'text/plain; charset=UTF-8',
'Cache-Control' => 'public, max-age=86400',
]);
}
public function robots(): Response
{
$indexable = app()->environment('production') && SiteSetting::booleanFor('seo_robots_enabled', true);