diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php new file mode 100644 index 0000000..506ef51 --- /dev/null +++ b/app/Http/Kernel.php @@ -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, + ], +]; diff --git a/config/cors.php b/config/cors.php new file mode 100644 index 0000000..62c8988 --- /dev/null +++ b/config/cors.php @@ -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/' +],