Config change to allow cors

This commit is contained in:
2025-09-09 16:15:28 +10:00
parent 91792252a7
commit c9580c2425
2 changed files with 18 additions and 0 deletions

12
app/Http/Kernel.php Normal file
View 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
View 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/'
],