configured cors for local development

This commit is contained in:
2024-07-14 10:50:02 +00:00
parent 18c711686c
commit 5afc3c916b
3 changed files with 22 additions and 9 deletions

View File

@@ -180,6 +180,10 @@ return [
App\Providers\RouteServiceProvider::class,
App\Providers\TelescopeServiceProvider::class,
Barryvdh\Debugbar\ServiceProvider::class,
// custom facades here..
App\Providers\DataTableServiceProvider::class,
],
/*

View File

@@ -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()`