I suggest you proxy only the routes you need. On Apr 18, 2012, at 9:11 PM, shinn wrote: > Hi, thanks for your reply. > > According to this source, CORS will required the targeted domain (http://bar.other in this example) to response with the "Access-Control-Allow-Origin". > > This is the reason I'm not using CORS, because the targeted domain is not belong to me, I've no way to add the "Access-Control-Allow-Origin" header on its server. Correct me if I'm wrong. > > On Thursday, April 19, 2012 6:09:45 AM UTC+8, raggi wrote: > > On Apr 18, 2012, at 6:10 AM, shinn wrote: > >> Hi all, >> >> I'm currently developing a rails app that required to do cross side scripting with ajax. I've been google around and found this rack middleware that used rack on doing proxy. However I have no idea on how to use it in my app. Please help, I'm using Rails 3.2.3. Thanks! > > http://guides.rubyonrails.org/rails_on_rack.html > > It sounds like you probably want CORS though, not a proxy. > > http://blog.davelyon.net/cross-origin-resource-sharing-on-rails > http://www.tsheffler.com/blog/?p=428 > http://www.google.com/search?q=CORS+on+rails