Browse Source

Merge branch 'mohammad' of https://gitea.hooradev.ir/mahdihty/liwo into mahdi

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

1
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,

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
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

16
composer.json

@ -8,24 +8,24 @@
],
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"ext-gd": "*",
"ext-json": "*",
"php": "^7.3|^8.0",
"anik/amqp": "^1.3",
"torann/geoip": "^3.0",
"spatie/image": "^1.0",
"morilog/jalali": "3.*",
"laravel/tinker": "^2.5",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"jenssegers/agent": "^2.6",
"laravel/socialite": "^5.1",
"laravel/framework": "^8.12",
"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-cached-adapter": "~1.0",
"morilog/jalali": "3.*",
"spatie/image": "^1.0",
"spatie/laravel-medialibrary": "^9.0",
"spatie/laravel-query-builder": "^3.3",
"league/flysystem-cached-adapter": "~1.0"
"torann/geoip": "^3.0"
},
"require-dev": {
"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",
"This file is @generated automatically"
],
"content-hash": "5fa03c0090cecfc0c45ad964962ea582",
"content-hash": "5bd413ba3541289df0ed987c8c36efb7",
"packages": [
{
"name": "anik/amqp",
@ -9242,9 +9242,9 @@
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
"php": "^7.3|^8.0",
"ext-gd": "*",
"ext-json": "*",
"php": "^7.3|^8.0"
"ext-json": "*"
},
"platform-dev": [],
"plugin-api-version": "2.0.0"

1
config/app.php

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

9
config/cors.php

@ -1,18 +1,19 @@
<?php
return [
'paths' => ['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,

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