1. #1
    Ext User
    Join Date
    Apr 2010
    Posts
    3
    Vote Rating
    0
    pzanotti is on a distinguished road

      0  

    Default Cross site httpProxy

    Cross site httpProxy


    Hi,
    does anyone know how to retrieve data from remote server withing ext.air application?
    I've read that adobe AIR doesn't support Ext.data.ScriptTagProxy and Ext.data.httpProxy doesn't allow to do this request.
    Thanks at all

  2. #2
    Sencha User makana's Avatar
    Join Date
    Apr 2008
    Location
    Dresden, Germany
    Posts
    527
    Vote Rating
    19
    makana has a spectacular aura about makana has a spectacular aura about

      0  

    Default


    Quote Originally Posted by pzanotti View Post
    Ext.data.httpProxy doesn't allow to do this request
    Did you test it?
    Use it! It works with HttpProxy!

    edit: Rating one's own thread excellent is usually not the way to receive answers promptly. Instead it distorts other threads that are worth to rate so...
    Programming today is a race between software engineers striving to build bigger and better іdiot-proof programs, and the universe striving to produce bigger and better idiots. So far, the universe is winning. (Rick Cook)

    Enhanced ExtJS adapter for Adobe AIR

  3. #3
    Ext User
    Join Date
    Apr 2010
    Posts
    3
    Vote Rating
    0
    pzanotti is on a distinguished road

      0  

    Default cross-domain AIR httpProxy

    cross-domain AIR httpProxy


    Quote Originally Posted by makana View Post
    Did you test it?
    Use it! It works with HttpProxy!
    Yes, I did.
    I've read in the documentation HttpProxy cannot be used to retrieve data from a domain other than the domain from which the running page was served.
    When I try to use it to do this, AIR doesn't return any error; if I run application on firefox, firebug shows "Access to restricted URI denied" code: "1012".
    Any other suggestion?
    Thank you

  4. #4
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    89
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    You will need to setup a crossdomain.xml to make this work with HttpProxy.

  5. #5
    Sencha User makana's Avatar
    Join Date
    Apr 2008
    Location
    Dresden, Germany
    Posts
    527
    Vote Rating
    19
    makana has a spectacular aura about makana has a spectacular aura about

      0  

    Default


    @Condor,
    do you speak about AIR or Firefox? What do you mean?
    I've done this in AIR without any extras and it works fine:
    Code:
    var store = new Ext.data.JsonStore({
    	remoteSort: true,
    	autoLoad: true,
    	idProperty: 'threadid',
    	root: 'topics',
    	totalProperty: 'totalCount',
    	fields: [
    		'threadid',
    		'title'
    	],
    	proxy: new Ext.data.HttpProxy({
    		url: 'http://extjs.com/forum/topics-browse-remote.php'
    	})
    });
    new Ext.grid.GridPanel({
    	renderTo: Ext.getBody(),
    	width: 600,
    	height: 300,
    	columns: [{
    		header: 'ID',
    		width: 100,
    		dataIndex: 'threadid',
    		id: 'id'
    	},{
    		header: 'Title',
    		width: 400,
    		dataIndex: 'title',
    		id: 'title'
    	}],
    	store: store
    });
    Programming today is a race between software engineers striving to build bigger and better іdiot-proof programs, and the universe striving to produce bigger and better idiots. So far, the universe is winning. (Rick Cook)

    Enhanced ExtJS adapter for Adobe AIR

  6. #6
    Ext User
    Join Date
    Apr 2010
    Posts
    3
    Vote Rating
    0
    pzanotti is on a distinguished road

      0  

    Default


    I've tried to do/debugging a remote request on firefox because AIR didn't return any error/message and i wanted to undestand what was happened.
    I'll try to use your example...
    thanks

  7. #7
    Sencha User makana's Avatar
    Join Date
    Apr 2008
    Location
    Dresden, Germany
    Posts
    527
    Vote Rating
    19
    makana has a spectacular aura about makana has a spectacular aura about

      0  

    Default


    you cannot run air apps in firefox in any case...
    Programming today is a race between software engineers striving to build bigger and better іdiot-proof programs, and the universe striving to produce bigger and better idiots. So far, the universe is winning. (Rick Cook)

    Enhanced ExtJS adapter for Adobe AIR

Similar Threads

  1. Ext JS Cross-Site Access Error Under WebKit
    By sidragon in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 12 May 2011, 5:18 AM
  2. Preventing cross site request forgery
    By subhas in forum Community Discussion
    Replies: 10
    Last Post: 30 Jan 2011, 11:13 AM
  3. [NEWS] Security now Episode - Cross site request forgery
    By jay@moduscreate.com in forum Community Discussion
    Replies: 0
    Last Post: 20 Oct 2008, 11:06 AM
  4. Add Cross-domain AJAX support to Ext.data.HttpProxy
    By onlysimchas in forum Ext 2.x: User Extensions and Plugins
    Replies: 0
    Last Post: 17 Mar 2008, 11:31 PM
  5. Cross-site scripting
    By ferr in forum Community Discussion
    Replies: 6
    Last Post: 25 Jan 2008, 9:37 AM

Thread Participants: 2