SEO additions index now
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user