Results 1 to 4 of 4

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

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Join Date
    Jun 2012
    Posts
    4
    Vote Rating
    0
      0  

    Default 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
    623
    Answers
    67
    Vote Rating
    29
      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
      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
    623
    Answers
    67
    Vote Rating
    29
      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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •