Hi, I have created laravel API and configured CORS and it works fine in development server. But when i deployed that application in shared hosting. It starts giving CORS issue.
After some testing and debugging I found that OPTION request in my production server doesn't returns with CORS header but in development server it does.
Did any face similar issue? or know how to fix that?
It's a share hosting server, so i followed the step require to host website. I already have experience in deploying laravel site in share hosting server and had done it plenty of time in past with no issues. But this is the first time for Laravel API.
So my laravel is using fruitcake/CORS middleware to deal with CORS which works perfectly in local server spin up with artisan command.
But when i deploy it to Apache server, my angular application gives CORS issue. I have verified OPTIONS request with postman for both local and Apache(Prod) server and they both returned with same header and it works locally but not with apache server.
I have tried by adding headers using .htaccess but no progress so far.