Config change to allow cors
This commit is contained in:
12
app/Http/Kernel.php
Normal file
12
app/Http/Kernel.php
Normal file
@ -0,0 +1,12 @@
|
||||
// In file: app/Http/Kernel.php
|
||||
protected $middlewareGroups = [
|
||||
'web' => [
|
||||
// ...
|
||||
],
|
||||
|
||||
'api' => [
|
||||
\Illuminate\Http\Middleware\HandleCors::class, // <-- ENSURE THIS LINE IS UNCOMMENTED
|
||||
'throttle:api',
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
],
|
||||
];
|
||||
6
config/cors.php
Normal file
6
config/cors.php
Normal file
@ -0,0 +1,6 @@
|
||||
// In file: config/cors.php
|
||||
'allowed_origins' => [
|
||||
'http://localhost:3000', // For npm run dev on your desktop
|
||||
'http://192.168.20.13', // Or whatever IP your T3 app might be on
|
||||
'http://laravel-server.lab.audasmedia.com.au/'
|
||||
],
|
||||
Reference in New Issue
Block a user