1. #1
    Sencha User
    Join Date
    Jul 2013
    Posts
    99
    Vote Rating
    10
    tt88 will become famous soon enough

      0  

    Default A way to specify allowed domains for Sencha's Proxy?

    A way to specify allowed domains for Sencha's Proxy?


    Hi

    I have a native sencha app which references services from my server at a specific domain.
    Rather than using limited jsonp calls (I'm getting stuck having to write complicated code to do simple ajax calls for rest creates / updates) I would like to be able to interchangeably use ajax + json calls.

    Is there a way to allow calls to a specific server domain in my Sencha app - and thus remove the requirement to use jsonp? (all my service calls will always live at that one particular domain)

    I did find the following options:
    - in the proxy setting useDefaultXhrHeader : false + on the server specify: response.setHeader("Access-Control-Allow-Origin", clientOrigin)
    This option is not sufficient because I don't want to open up requests to any domain, only the particular one where my services reside.

    Thanks
    ttw

  2. #2
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    3,832
    Vote Rating
    124
    fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all

      1  

    Default


    With phonegap you can white list domains.
    http://docs.phonegap.com/en/2.9.0/gu...telist%20Guide

  3. #3
    Sencha User
    Join Date
    Jul 2013
    Posts
    99
    Vote Rating
    10
    tt88 will become famous soon enough

      0  

    Default


    Quote Originally Posted by fmoseley View Post
    With phonegap you can white list domains.
    http://docs.phonegap.com/en/2.9.0/gu...hitelist Guide
    Thanks

Thread Participants: 1