Hybrid View

  1. #1

    Join Date
    Jun 2012
    Posts
    4
    Vote Rating
    0
    rmalhotr is on a distinguished road

      0  

    Default Unanswered: Access-Control-Allow-Origin header when building with Sencha Cmd

    Unanswered: Access-Control-Allow-Origin header when building with Sencha Cmd


    Hello,
    I've been working on a sencha touch app that is supposed to make an ajax call to a pre-existing xml based service. My question is that if I want to set Access-Control-Allow-Origin header in the web server that I need to call, what domain origin should I allow it from? My touch app will be deployed in the app store, I don't want to say Access-Control-Allow-Origin header: * since that would open for all domains. If my app is going to be downloaded from the app store and run from a consumer's cell phone what will be the origin?

    thanks,

    Rahul

  2. #2
    Sencha User bluehipy's Avatar
    Join Date
    Mar 2010
    Location
    Romania
    Posts
    606
    Answers
    66
    Vote Rating
    26
    bluehipy will become famous soon enough bluehipy will become famous soon enough

      0  

    Default


    On the server side you have to reflect the host from which the request was made.

  3. #3

    Join Date
    Jun 2012
    Posts
    4
    Vote Rating
    0
    rmalhotr is on a distinguished road

      0  

    Default


    I don't get it, if the app is going to be downloaded from the App Store then what do I put on server side for the value of Access-Control-Allow-Origin?

  4. #4
    Sencha User bluehipy's Avatar
    Join Date
    Mar 2010
    Location
    Romania
    Posts
    606
    Answers
    66
    Vote Rating
    26
    bluehipy will become famous soon enough bluehipy will become famous soon enough

      0  

    Default


    Quote Originally Posted by rmalhotr View Post
    I don't get it, if the app is going to be downloaded from the App Store then what do I put on server side for the value of Access-Control-Allow-Origin?
    Doesn't matter where you download the application from. All it matters is where it runs from.

    And if it runs on devices I think you might not have the Allow origin issue at all anyway.

Thread Participants: 1

Tags for this Thread