On this page
HandleCors
class HandleCors (View source)
Properties
protected Container | $container | The container instance. |
|
protected CorsService | $cors | The CORS service instance. |
Methods
void | __construct(Container $container, CorsService $cors) Create a new middleware instance. |
|
Response | handle(Request $request, Closure $next) Handle the incoming request. |
|
bool | hasMatchingPath(Request $request) Get the path from the configuration to determine if the CORS service should run. |
|
array | getPathsByHost(string $host) Get the CORS paths for the given host. |
Details
void __construct(Container $container, CorsService $cors)
Create a new middleware instance.
protected bool hasMatchingPath(Request $request)
Get the path from the configuration to determine if the CORS service should run.
protected array getPathsByHost(string $host)
Get the CORS paths for the given host.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/10.x/Illuminate/Http/Middleware/HandleCors.html