I've been having the following CORS issue for days and I'm no closed to fixing it. The Angular app on localhost:4200 isn't letting me access the route to upload photos.
My backend is in Laravel
I can log in, register, and perform other post requests, but not this.
This is an image of my app.
This is my CORS middleware which is registered as a global middleware]
public function handle($request, Closure $next)
{
return $next($request)
->header('Access-Control-Allow-Credentials', 'true')
->header('Access-Control-Allow-Origin', 'http://localhost:4200')
->header('Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE')
->header('Access-Control-Max-Age', '3600')
->header('Access-Control-Allow-Headers', 'Origin, Content-Type, Authorization');
}
Reponse Headers in network tab
1