diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 4bd9d18..a7f5254 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -17,7 +17,6 @@ class Kernel extends HttpKernel protected $middleware = [ // \App\Http\Middleware\TrustHosts::class, \App\Http\Middleware\TrustProxies::class, - \Fruitcake\Cors\HandleCors::class, \App\Http\Middleware\PreventRequestsDuringMaintenance::class, \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, \App\Http\Middleware\TrimStrings::class, diff --git a/app/Models/User.php b/app/Models/User.php index 1a71790..5095cb9 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -11,7 +11,6 @@ use Illuminate\Validation\Rule; use Illuminate\Http\UploadedFile; use Spatie\MediaLibrary\HasMedia; use Illuminate\Auth\Authenticatable; -use Illuminate\Notifications\Notifiable; use Spatie\MediaLibrary\InteractsWithMedia; use Illuminate\Foundation\Auth\Access\Authorizable; use Spatie\MediaLibrary\MediaCollections\Models\Media; diff --git a/app/Utilities/Helpers/index.php b/app/Utilities/Helpers/index.php index 64aade6..b38e3aa 100644 --- a/app/Utilities/Helpers/index.php +++ b/app/Utilities/Helpers/index.php @@ -1 +1,13 @@ -trim("."); if ($filename->isEmpty()) { continue; } require_once (string) $filename; } \ No newline at end of file +trim("."); + if ($filename->isEmpty()) { + continue; + } + + require_once (string) $filename; +} diff --git a/bootstrap/app.php b/bootstrap/app.php index 037e17d..46df240 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,5 +1,6 @@ [ diff --git a/config/cors.php b/config/cors.php index 4598a66..99de7e7 100644 --- a/config/cors.php +++ b/config/cors.php @@ -1,18 +1,19 @@ ['user/v1/*'], + 'paths' => ['api/*'], 'allowed_methods' => ['*'], 'allowed_origins' => ['*'], - 'allowedOriginsPatterns' => ['Content-Type', 'X-Requested-With'], + 'allowed_origins_patterns' => [], 'allowed_headers' => ['*'], - 'exposed_headers' => [], - + 'exposed_headers' => ['x-custom-response-header'], + 'max_age' => 0, 'supports_credentials' => false, diff --git a/config/cors.php.bcp b/config/cors.php.bcp deleted file mode 100644 index 3aca0b8..0000000 --- a/config/cors.php.bcp +++ /dev/null @@ -1,34 +0,0 @@ - ['*', 'sanctum/csrf-cookie'], - - 'allowed_methods' => ['*'], - - 'allowed_origins' => ['*'], - - 'allowed_origins_patterns' => ['*'], - - 'allowed_headers' => ['*'], - - 'exposed_headers' => [], - - 'max_age' => 0, - - 'supports_credentials' => false, - -];