October 22, 2024
Chicago 12, Melborne City, USA
PHP

Flutter web cors error in production mode


While I developed an application with Flutter web and php APIs, I did not have any problems with CORs when it was running locally, but whenever I wanted to put the application into production, CORs errors were flooding. I researched the reason but could not find a solution, all solutions only make it work locally.

Please help, thank you.

I gave all permissions for all the APIs I wrote with PHP;

header("Access-Control-Allow-Origin: *");

header("Access-Control-Allow-Headers: *");

header("Content-Type: application/json");

However, the problem still persists and CORs errors are flooding in production.



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video