rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: James Tucker <jftucker@gmail.com>
To: rack-devel@googlegroups.com
Subject: Re: How to use a rack middleware in rails application?
Date: Fri, 20 Apr 2012 12:58:16 -0700	[thread overview]
Message-ID: <575D7BC2-77BB-400E-B61E-98DD9EF62F59@gmail.com> (raw)
In-Reply-To: <16441975.240.1334808670999.JavaMail.geo-discussion-forums@pbcuu8>

[-- Attachment #1: Type: text/plain, Size: 1171 bytes --]

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


[-- Attachment #2: Type: text/html, Size: 2199 bytes --]

  reply	other threads:[~2012-04-20 19:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-18 13:10 How to use a rack middleware in rails application? shinn
2012-04-18 22:09 ` James Tucker
2012-04-19  4:11   ` shinn
2012-04-20 19:58     ` James Tucker [this message]
2012-04-21  3:16       ` shinn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://groups.google.com/group/rack-devel

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=575D7BC2-77BB-400E-B61E-98DD9EF62F59@gmail.com \
    --to=rack-devel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).