Implement creator studio and upload updates
This commit is contained in:
25
app/Http/Controllers/RobotsTxtController.php
Normal file
25
app/Http/Controllers/RobotsTxtController.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
final class RobotsTxtController extends Controller
|
||||
{
|
||||
public function __invoke(): Response
|
||||
{
|
||||
$content = implode("\n", [
|
||||
'User-agent: *',
|
||||
'Allow: /',
|
||||
'Sitemap: ' . url('/sitemap.xml'),
|
||||
'',
|
||||
]);
|
||||
|
||||
return response($content, 200, [
|
||||
'Content-Type' => 'text/plain; charset=UTF-8',
|
||||
'Cache-Control' => 'public, max-age=' . max(60, (int) config('sitemaps.cache_ttl_seconds', 900)),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user