1

I'm trying to send a PUT request and I get this:

enter image description here

Strangely, when I click on this it shows me a 200 OK. I also see that the headers allow everything so I don't see why it's telling my PUT is not allowed.

enter image description here

I have a separate question detailing the angular aspect of the app here: https://stackoverflow.com/questions/22467052/is-this-usage-of-ngresource-correct

Community
  • 1
  • 1
user2483724
  • 2,089
  • 5
  • 27
  • 43

1 Answers1

0

Error :Request header field Content-Type is not allowed by Access-Control-Allow-Headers

Very strange fix, on the server side I had to change:

response.setHeader("*");

to

response.setHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");

For some reason the asterisk doesn't cover "content-type"

Community
  • 1
  • 1
user2483724
  • 2,089
  • 5
  • 27
  • 43