title: https-options request fails (400 bad request) only in Safari 10 Mac and iOS cors
body: <p>The <strong>options request</strong> is always getting failed(<strong>400 bad request</strong>) especially in HTTPS environment on <strong>MAC OSX and iOS 10</strong> in <strong>SAFARI</strong> <strong>only</strong>. Chrome and other browsers works fine (200). We tried almost everything that we know to solve it but nothing seems to work. Following is the ajax call with options headers with cross domain:</p>
  
  <pre><code>$.ajax(
      {
          headers: {
              Accept : "application/json",
              'Content-Type': "application/json"
          },
          type : "POST",
          url : userDataSource,
          contentType: "application/json",
          data : JSON.stringify(formData),
          dataType : 'json', 
          xhrFields :{
              withCredentials: true
          },
          crossDomain : true,
          success : function(data){........}}).....
  </code></pre>
  
  <p>We tried following modifications on javascript:</p>
  
  <ul>
  <li>Modifying the preflight headers ( Accept and content-type )</li>
  <li>Removing the headers.</li>
  <li>Changing the headers to small case and vice-versa.</li>
  <li>Adding some headers as per the response headers.</li>
  </ul>
  
  <p>We made similar changes on Server side as well and made some Proxy level changes as well, but nothing helped. It is not a public web application but its inside organisation network.</p>
  
  <p>Its really important for us to solve it as it is blocking the delivery.</p>
  
  <p>Please help.</p>
  
  <p><a href="https://i.stack.imgur.com/GA0jO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GA0jO.png" alt="enter image description here"></a></p>