Browse Source

fuck you all

masoud
masoud 4 years ago
parent
commit
19d4024b3c
  1. 1
      app/Http/Kernel.php
  2. 1
      app/Models/User.php
  3. 14
      app/Utilities/Helpers/index.php
  4. 3
      bootstrap/app.php
  5. 16
      composer.json
  6. 6
      composer.lock
  7. 1
      config/app.php
  8. 7
      config/cors.php
  9. 34
      config/cors.php.bcp

1
app/Http/Kernel.php

@ -17,7 +17,6 @@ class Kernel extends HttpKernel
protected $middleware = [ protected $middleware = [
// \App\Http\Middleware\TrustHosts::class, // \App\Http\Middleware\TrustHosts::class,
\App\Http\Middleware\TrustProxies::class, \App\Http\Middleware\TrustProxies::class,
\Fruitcake\Cors\HandleCors::class,
\App\Http\Middleware\PreventRequestsDuringMaintenance::class, \App\Http\Middleware\PreventRequestsDuringMaintenance::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class, \App\Http\Middleware\TrimStrings::class,

1
app/Models/User.php

@ -11,7 +11,6 @@ use Illuminate\Validation\Rule;
use Illuminate\Http\UploadedFile; use Illuminate\Http\UploadedFile;
use Spatie\MediaLibrary\HasMedia; use Spatie\MediaLibrary\HasMedia;
use Illuminate\Auth\Authenticatable; use Illuminate\Auth\Authenticatable;
use Illuminate\Notifications\Notifiable;
use Spatie\MediaLibrary\InteractsWithMedia; use Spatie\MediaLibrary\InteractsWithMedia;
use Illuminate\Foundation\Auth\Access\Authorizable; use Illuminate\Foundation\Auth\Access\Authorizable;
use Spatie\MediaLibrary\MediaCollections\Models\Media; use Spatie\MediaLibrary\MediaCollections\Models\Media;

14
app/Utilities/Helpers/index.php

@ -1 +1,13 @@
<?php use Illuminate\Support\Str; $helpers = scandir(__DIR__); foreach ($helpers as $helper) { $filename = Str::of($helper)->trim("."); if ($filename->isEmpty()) { continue; } require_once (string) $filename; }
<?php
use Illuminate\Support\Str;
$helpers = scandir(__DIR__);
foreach ($helpers as $helper) {
$filename = Str::of($helper)->trim(".");
if ($filename->isEmpty()) {
continue;
}
require_once (string) $filename;
}

3
bootstrap/app.php

@ -1,5 +1,6 @@
<?php <?php
header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Methods: *');
header('Access-Control-Allow-Headers: Origin, X-Requested-With,Authorization, Content-Type, Accept');
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Create The Application | Create The Application

16
composer.json

@ -8,24 +8,24 @@
], ],
"license": "MIT", "license": "MIT",
"require": { "require": {
"php": "^7.3|^8.0",
"ext-gd": "*", "ext-gd": "*",
"ext-json": "*", "ext-json": "*",
"php": "^7.3|^8.0",
"anik/amqp": "^1.3", "anik/amqp": "^1.3",
"torann/geoip": "^3.0",
"spatie/image": "^1.0",
"morilog/jalali": "3.*",
"laravel/tinker": "^2.5",
"fideloper/proxy": "^4.4", "fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"jenssegers/agent": "^2.6", "jenssegers/agent": "^2.6",
"laravel/socialite": "^5.1",
"laravel/framework": "^8.12", "laravel/framework": "^8.12",
"laravel/legacy-factories": "^1", "laravel/legacy-factories": "^1",
"fruitcake/laravel-cors": "^2.0",
"laravel/socialite": "^5.1",
"laravel/tinker": "^2.5",
"league/flysystem-aws-s3-v3": "~1.0", "league/flysystem-aws-s3-v3": "~1.0",
"league/flysystem-cached-adapter": "~1.0",
"morilog/jalali": "3.*",
"spatie/image": "^1.0",
"spatie/laravel-medialibrary": "^9.0", "spatie/laravel-medialibrary": "^9.0",
"spatie/laravel-query-builder": "^3.3", "spatie/laravel-query-builder": "^3.3",
"league/flysystem-cached-adapter": "~1.0"
"torann/geoip": "^3.0"
}, },
"require-dev": { "require-dev": {
"facade/ignition": "^2.5", "facade/ignition": "^2.5",

6
composer.lock

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "5fa03c0090cecfc0c45ad964962ea582",
"content-hash": "5bd413ba3541289df0ed987c8c36efb7",
"packages": [ "packages": [
{ {
"name": "anik/amqp", "name": "anik/amqp",
@ -9242,9 +9242,9 @@
"prefer-stable": true, "prefer-stable": true,
"prefer-lowest": false, "prefer-lowest": false,
"platform": { "platform": {
"php": "^7.3|^8.0",
"ext-gd": "*", "ext-gd": "*",
"ext-json": "*",
"php": "^7.3|^8.0"
"ext-json": "*"
}, },
"platform-dev": [], "platform-dev": [],
"plugin-api-version": "2.0.0" "plugin-api-version": "2.0.0"

1
config/app.php

@ -65,7 +65,6 @@ return [
App\Providers\EventServiceProvider::class, App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class, App\Providers\RouteServiceProvider::class,
App\Utilities\Zarinpal\Laravel\ZarinpalServiceProvider::class, App\Utilities\Zarinpal\Laravel\ZarinpalServiceProvider::class,
Fruitcake\Cors\CorsServiceProvider::class
], ],
'aliases' => [ 'aliases' => [

7
config/cors.php

@ -1,17 +1,18 @@
<?php <?php
return [ return [
'paths' => ['user/v1/*'],
'paths' => ['api/*'],
'allowed_methods' => ['*'], 'allowed_methods' => ['*'],
'allowed_origins' => ['*'], 'allowed_origins' => ['*'],
'allowedOriginsPatterns' => ['Content-Type', 'X-Requested-With'],
'allowed_origins_patterns' => [],
'allowed_headers' => ['*'], 'allowed_headers' => ['*'],
'exposed_headers' => [],
'exposed_headers' => ['x-custom-response-header'],
'max_age' => 0, 'max_age' => 0,

34
config/cors.php.bcp

@ -1,34 +0,0 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Cross-Origin Resource Sharing (CORS) Configuration
|--------------------------------------------------------------------------
|
| Here you may configure your settings for cross-origin resource sharing
| or "CORS". This determines what cross-origin operations may execute
| in web browsers. You are free to adjust these settings as needed.
|
| To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
|
*/
'paths' => ['*', 'sanctum/csrf-cookie'],
'allowed_methods' => ['*'],
'allowed_origins' => ['*'],
'allowed_origins_patterns' => ['*'],
'allowed_headers' => ['*'],
'exposed_headers' => [],
'max_age' => 0,
'supports_credentials' => false,
];
Loading…
Cancel
Save