The reason your script works for text / plain is because it is a simple request. If you look at this answer , you will see that your text / plain request meets the requirements for a simple request. However, when you change the content type to text / xml, it changes it to a "difficult" request.
For your "difficult" request to work, you need to see how to make a request before the flight. This website explains how you can do this in the "Handling a Difficult Request" section.
Update
Just a note: Access-Control-Allow-Methods is sensitive (everything is in uppercase), and you do not need to list any methods used for a simple request (GET, HEAD, POST). - source
Access-Control-Allow-Methods: OPTIONS, PUT Access-Control-Allow-Headers: Authorization, Origin, Content-Type, Accept
Firefox does not have an Origin header for requests with the same source. But Chrome and Safari include the Origin header in POST / PUT / DELETE requests with the same source (GET requests with the same source code will not have the Origin header).
Is there a chance that the origin is the same?
Could there be a problem with the cache?
Make sure you have the settings for your jquery ajax call:
crossDomain: true
source share