diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 97c40798..860b3731 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -46,6 +46,5 @@ class Kernel extends HttpKernel 'login.throttling' => 'CachetHQ\Cachet\Http\Middleware\LoginThrottling', 'app.isSetup' => 'CachetHQ\Cachet\Http\Middleware\AppIsSetup', 'app.hasSetting' => 'CachetHQ\Cachet\Http\Middleware\HasSetting', - 'cors' => 'CachetHQ\Cachet\Http\Middleware\Cors', ]; } diff --git a/app/Http/Middleware/Admin.php b/app/Http/Middleware/Admin.php index 8f1e27f4..f086004e 100644 --- a/app/Http/Middleware/Admin.php +++ b/app/Http/Middleware/Admin.php @@ -37,8 +37,6 @@ class Admin } /** - * Run the cors middleware. - * * We're verifying that the current user is logged in to Cachet and is an admin level. * * @param \Illuminate\Http\Request $request diff --git a/app/Http/Middleware/Cors.php b/app/Http/Middleware/Cors.php deleted file mode 100644 index 6aafae83..00000000 --- a/app/Http/Middleware/Cors.php +++ /dev/null @@ -1,36 +0,0 @@ - - * (c) Joseph Cohen - * (c) Graham Campbell - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace CachetHQ\Cachet\Http\Middleware; - -use Closure; - -class Cors -{ - /** - * Run the cors middleware. - * - * @param \Illuminate\Http\Request $request - * @param \Closure $next - * - * @return mixed - */ - public function handle($request, Closure $next) - { - $response = $next($request); - - $response->headers->set('Access-Control-Allow-Origin', '*'); - - return $response; - } -}