mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Merge pull request #5011 from ThisIsMissEm/feat/add-api-cors
Adjust CORS configuration to support API & OAuth Routes
This commit is contained in:
commit
e2c2952fda
2 changed files with 8 additions and 5 deletions
|
@ -14,12 +14,12 @@ class Kernel extends HttpKernel
|
|||
* @var array
|
||||
*/
|
||||
protected $middleware = [
|
||||
\Illuminate\Http\Middleware\HandleCors::class,
|
||||
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
|
||||
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
|
||||
\App\Http\Middleware\TrustProxies::class,
|
||||
\App\Http\Middleware\TrimStrings::class,
|
||||
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
||||
\App\Http\Middleware\TrustProxies::class,
|
||||
\Illuminate\Http\Middleware\HandleCors::class,
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
@ -22,7 +22,9 @@ return [
|
|||
* Example: ['api/*']
|
||||
*/
|
||||
'paths' => [
|
||||
'.well-known/*'
|
||||
'.well-known/*',
|
||||
'api/*',
|
||||
'oauth/*'
|
||||
],
|
||||
|
||||
/*
|
||||
|
@ -48,7 +50,8 @@ return [
|
|||
/*
|
||||
* Sets the Access-Control-Expose-Headers response header with these headers.
|
||||
*/
|
||||
'exposed_headers' => [],
|
||||
// TODO: Add support for rate-limit related headers
|
||||
'exposed_headers' => ['Link'],
|
||||
|
||||
/*
|
||||
* Sets the Access-Control-Max-Age response header when > 0.
|
||||
|
|
Loading…
Reference in a new issue