0

I need to fix an error in angularJs when i make a put call request to an api who was written in symfony2.

I am from http://ex-admin.com in angularjs and the domain where i make the call is not the same, it is http://ex.com. I also saw the similar answers for this problem,but I don't fix the issue yet.

I think that the problem is from server where I make the call to this api(http:ex.com) in symfony. I also install the nelmio cors, but the issue remains there. Also i want to say that the call works only for get and post, but for put or delete it doesn't work.

Do I have to configure also apache in this case? But the problem is how because I don't know... Can everybody helps me?

Thanks a lot, Flavius

Flavius
  • 37
  • 1
  • 7

1 Answers1

0

The problem in my case was this:

I had in app.php $_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD'] to be allow only the post and get request, and I extended the condition to allow the request also for PUT and DELETE. ($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD'] to be post, get, put and delete.

Thank you :D

Flavius

Flavius
  • 37
  • 1
  • 7