title: Cross-domain AJAX request not working
body: <p>I'm calling POST on a third-party API that I've been working with via jQuery's $.ajax function. However, when I make the call I get the following error: <code>XMLHttpRequest cannot load http://the-url.com. The request was redirected to 'http://the-url.com/anotherlocation', which is disallowed for cross-origin requests that require preflight.</code> </p>
  
  <p>I saw from <a href="https://stackoverflow.com/questions/20229248/which-is-disallowed-for-cross-origin-requests-that-require-preflight-error-in">this post</a> that this might be a Webkit bug, so I tried it in Firefox (I'm developing in Chrome) and I got the same result.I've tried this on Chrome and Firefox and I get the same result. </p>
  
  <p>Per <a href="https://stackoverflow.com/questions/3506208/jquery-ajax-cross-domain">this post</a>, I also tried using jsonp both by setting the <code>crossDomain</code> property of the $.ajax function to <code>true</code> and setting the <code>dataType</code> to <code>jsonp</code>. But, this caused a 500 internal server error.</p>
  
  <p>When I start Chrome with the --disable-web-security flag, I don't have any problems. However, if I start the browser normally, then I get the error.</p>
  
  <p>So, I guess this might sort of be a 2-part question. What can I do to make this cross-domain request? If JSONP is the answer, then how do I go about figuring out if the third-party API is set up correctly to support this?</p>
  
  <p><em>EDIT:</em> Here's the screenshot when I make the call with the browser security disabled: <a href="https://drive.google.com/file/d/0Bzo7loNBQcmjUjk5YWNWLXM2SVE/edit?usp=sharing" rel="nofollow noreferrer">https://drive.google.com/file/d/0Bzo7loNBQcmjUjk5YWNWLXM2SVE/edit?usp=sharing</a></p>
  
  <p>Here's the screenchost when I make the call with the browser security enabled (like normal): <a href="https://drive.google.com/file/d/0Bzo7loNBQcmjam5NQ3BKWUluRE0/edit?usp=sharing" rel="nofollow noreferrer">https://drive.google.com/file/d/0Bzo7loNBQcmjam5NQ3BKWUluRE0/edit?usp=sharing</a></p>