configured cors for local development
This commit is contained in:
@@ -60,14 +60,23 @@ class RouteServiceProvider extends ServiceProvider
|
||||
{
|
||||
Route::middleware('web')
|
||||
// ->middleware('confirmUser')
|
||||
->namespace($this->namespace)
|
||||
->group(base_path('routes/web.php'));
|
||||
->namespace($this->namespace)
|
||||
->group(base_path('routes/web.php'));
|
||||
|
||||
Route::prefix('v2')
|
||||
->middleware('web', 'auth', 'confirmUser')
|
||||
->namespace($this->namespace)
|
||||
->group(base_path('routes/v2.php'));
|
||||
|
||||
Route::prefix('api/v3')
|
||||
->name('v3')
|
||||
->middleware('web', 'auth', 'confirmUser')
|
||||
->namespace($this->namespace)
|
||||
->group(base_path('routes/v3.php'));
|
||||
Route::prefix('api')
|
||||
->middleware('api')
|
||||
->namespace($this->namespace)
|
||||
->group(base_path('routes/api.php'));
|
||||
Route::prefix('RandD')
|
||||
->middleware('web', 'auth', 'confirmUser', 'randd')
|
||||
->namespace($this->namespace)
|
||||
@@ -83,9 +92,6 @@ class RouteServiceProvider extends ServiceProvider
|
||||
*/
|
||||
protected function mapApiRoutes()
|
||||
{
|
||||
Route::prefix('api')
|
||||
->middleware('api')
|
||||
->namespace($this->namespace)
|
||||
->group(base_path('routes/api.php'));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,6 +180,10 @@ return [
|
||||
App\Providers\RouteServiceProvider::class,
|
||||
App\Providers\TelescopeServiceProvider::class,
|
||||
Barryvdh\Debugbar\ServiceProvider::class,
|
||||
|
||||
// custom facades here..
|
||||
App\Providers\DataTableServiceProvider::class,
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
$allowed_origins = env('IS_DEVELOPMENT_ENV') ? ['*'] : ['https://rms.rmto.ir'];
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
@@ -32,7 +34,8 @@ return [
|
||||
/*
|
||||
* Matches the request origin. `[*]` allows all origins.
|
||||
*/
|
||||
'allowed_origins' => ['*'],
|
||||
// 'allowed_origins' => ['*'],
|
||||
'allowed_origins' => $allowed_origins,
|
||||
|
||||
/*
|
||||
* Matches the request origin with, similar to `Request::is()`
|
||||
|
||||
Reference in New Issue
Block a user