1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    1
    Vote Rating
    0
    uncle_costa is on a distinguished road

      0  

    Question Unanswered: Preflighted Resquest and ExtJS

    Unanswered: Preflighted Resquest and ExtJS


    Hi,

    I'm sorry if this question has already been asked, but I haven't found any info either via search engines or the forum.

    I have an app that has the frontend (ExtJS) on one domain and the webservices servicing the frontend on another domain.

    Everytime I make a request to an URL, an OPTIONS request is sent to the server first. I understand this is something that could be wanted, but does anyone know (or can point me to the doc) on how to make ExtJS not do this OTIONS call ?

    Thanks in advance for your help,
    Costa.

  2. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,625
    Vote Rating
    331
    Answers
    550
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    I don't believe ExtJS has any control over this, it's done behind the scenes by the browser.

    See:

    http://en.wikipedia.org/wiki/Cross-O...source_Sharing
    https://developer.mozilla.org/en/http_access_control

    The second article suggests that you may be able to prevent the OPTIONS request by setting a suitable Content-Type header on the request. There are several ways to do this in ExtJS, see the docs for Ext.Ajax:

    http://docs.sencha.com/ext-js/4-0/#!...defaultHeaders
    http://docs.sencha.com/ext-js/4-0/#!...method-request

Thread Participants: 1

Tags for this Thread