chore: Refactor configuration files based on Laravel 10 skeleton
This commit is contained in:
parent
3f78d5118a
commit
bebbfec510
35 changed files with 205 additions and 284 deletions
|
@ -1,28 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class ActivityStreamLinks
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*/
|
||||
public function handle(Request $request, Closure $next): Response
|
||||
{
|
||||
$response = $next($request);
|
||||
if ($request->path() === '/') {
|
||||
$response->header('Link', '<' . config('app.url') . '>; rel="application/activity+json"', false);
|
||||
}
|
||||
if ($request->is('notes/*')) {
|
||||
$response->header('Link', '<' . $request->url() . '>; rel="application/activity+json"', false);
|
||||
}
|
||||
|
||||
return $response;
|
||||
}
|
||||
}
|
22
app/Http/Middleware/ValidateSignature.php
Normal file
22
app/Http/Middleware/ValidateSignature.php
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Routing\Middleware\ValidateSignature as Middleware;
|
||||
|
||||
class ValidateSignature extends Middleware
|
||||
{
|
||||
/**
|
||||
* The names of the query string parameters that should be ignored.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $except = [
|
||||
// 'fbclid',
|
||||
// 'utm_campaign',
|
||||
// 'utm_content',
|
||||
// 'utm_medium',
|
||||
// 'utm_source',
|
||||
// 'utm_term',
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue