The CORS specification states that if a HTTP request is considered 'simple', no CORS and/or preflight is needed.
I'm trying to do a HTTP request that appears to have these conditions:
- I'm not setting custom HTTP headers.
- I'm using a
POST
method. - I'm using
application/x-www-form-urlencoded
.
Code sample:
$.ajax({
type: 'POST',
url: 'http://example.org/',
data: {foo: 'bar'}
});
However, when running this, the request is still preflighted with OPTIONS
(which fails). Is there something obvious I'm missing?
A few references to simple requests: