Reputation: 186113
For instance, an Ajax request:
$.post( 'http://example.com/script.pl', formdata, function ( data ) {
// ...
});
But this request also includes an "Origin" header - even though it is not a cross-domain request.
Why is this header included in my Ajax-requests and how can I remove it from them?
Upvotes: 1
Views: 4185
Reputation: 47997
If you are in Chrome (and WebKit?), the "Origin" header is always included on POST, PUT and DELETE requests. This is true for both same-domain and cross-domain requests. The "Origin" header is not included on same-domain GET requests. AFIAK, there is no way to remove this.
Upvotes: 3