This repository has been archived by the owner on Feb 23, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2ab9858
commit 3be6f7e
Showing
3 changed files
with
9 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,12 +5,12 @@ | |
namespace Medz\Cors\Laravel\Middleware; | ||
|
||
use Closure; | ||
use Route; | ||
use Illuminate\Contracts\Events\Dispatcher; | ||
use Illuminate\Foundation\Http\Events\RequestHandled; | ||
use Illuminate\Http\Request; | ||
use Illuminate\Http\Response; | ||
use Medz\Cors\CorsInterface; | ||
use Route; | ||
|
||
class Cors | ||
{ | ||
|
@@ -82,7 +82,9 @@ public function handle($request, Closure $next) | |
* Has should route group. | ||
* | ||
* @param mixed $request | ||
* | ||
* @return bool | ||
* | ||
* @author Seven Du <[email protected]> | ||
*/ | ||
protected function hasShouldRouteGroup($request): bool | ||
|
@@ -111,12 +113,13 @@ protected function hasShouldRouteGroup($request): bool | |
* Has the request allow route perfix. | ||
* | ||
* @param \Illumante\Http\Request $request | ||
* | ||
* @return bool | ||
* | ||
* @author Seven Du <[email protected]> | ||
*/ | ||
protected function hasAllowRoutePerfix($request): bool | ||
{ | ||
|
||
return $request->is(config('cors.laravel.allow-route-perfix')); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,9 +11,11 @@ class ShouldGroup | |
/** | ||
* The should group handle. | ||
* | ||
* @param mixed $request | ||
* @param mixed $request | ||
* @param Closure $next | ||
* | ||
* @return mixed | ||
* | ||
* @author Seven Du <[email protected]> | ||
*/ | ||
public function handle($request, Closure $next) | ||
|