Alex Rivera | Logout

Why is ExtJS sending an OPTIONS request to the same domain?

Asked 2012-09-04T14:43:09.870
8

I'm loading my script on a domain and sending some data with POST and the use of Ext.Ajax.request() to that same domain.

Somehow the dev-tools show me, that there is a failed OPTIONS request.

Request URL : myurl-internal.com:8090/some/rest/api.php

Request Headers
  Access-Control-Request-Headers : origin, x-requested-with, content-type
  Access-Control-Request-Method  : POST
  Origin                         : http://myurl-internal.com:8090

It's both HTTP and not HTTPS. Same port, same host ... I don't know why it's doing this. The server can't handle such stuff and so the request fails and the whole system stops working.

Edit
Report

1 Answer

4

Use relative url instead of absolute, then you will get expected result.

answered 2012-10-22T08:49:16.793

Your Answer