Plugin for Cross-Domain Ajax Proxy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Plugin for Cross-Domain Ajax Proxy

Sean Gilligan-2
Is there an existing solution for adding a proxy service to a Grails
app?  I want to be able to do cross-domain Ajax requests and need a
proxy service to do it.  I'm thinking about wrapping an existing
ProxyServlet in a Grails plugin.  Is there a better approach?

-- Sean


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

RE: Plugin for Cross-Domain Ajax Proxy

msmyers
My spidey sense is going off. If you don't do authentication on this, you can become a proxy for all of China.

I dont know of existing solution. Pick up groovyx for the HTTP calls.

-----Original Message-----
From: Sean Gilligan [mailto:[hidden email]]
Sent: Sunday, August 30, 2009 9:55 PM
To: [hidden email]
Subject: [grails-user] Plugin for Cross-Domain Ajax Proxy

Is there an existing solution for adding a proxy service to a Grails
app?  I want to be able to do cross-domain Ajax requests and need a
proxy service to do it.  I'm thinking about wrapping an existing
ProxyServlet in a Grails plugin.  Is there a better approach?

-- Sean


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

RE: Plugin for Cross-Domain Ajax Proxy

Scott Burch
Have you tried using jsonp?

Look at jquery and jsonp for cross domain ajax.

It does not do everything, but it does do some things.

On Mon, 2009-08-31 at 11:38 -0700, Michael Smyers wrote:

> My spidey sense is going off. If you don't do authentication on this, you can become a proxy for all of China.
>
> I dont know of existing solution. Pick up groovyx for the HTTP calls.
>
> -----Original Message-----
> From: Sean Gilligan [mailto:[hidden email]]
> Sent: Sunday, August 30, 2009 9:55 PM
> To: [hidden email]
> Subject: [grails-user] Plugin for Cross-Domain Ajax Proxy
>
> Is there an existing solution for adding a proxy service to a Grails
> app?  I want to be able to do cross-domain Ajax requests and need a
> proxy service to do it.  I'm thinking about wrapping an existing
> ProxyServlet in a Grails plugin.  Is there a better approach?
>
> -- Sean
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
--
SmartWeb Systems - "Websites that think, should be smart"
Groovy/Grails development
Phone (USA): 518-632-6679
Phone (CAN): 514-885-6457
http://www.smartwebsystems.biz



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Plugin for Cross-Domain Ajax Proxy

Sean Gilligan-2
In reply to this post by msmyers
Michael Smyers wrote:
> My spidey sense is going off. If you don't do authentication on this, you can become a proxy for all of China.
>  

The proxy would be configured to only talk to a single server.

> I dont know of existing solution. Pick up groovyx for the HTTP calls.
>  

I'm looking at this Java and HttpClient based solution:
http://edwardstx.net/wiki/Wiki.jsp?page=HttpProxyServlet

-- Sean


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Plugin for Cross-Domain Ajax Proxy

Sean Gilligan-2
In reply to this post by Scott Burch
Scott Burch wrote:
> Have you tried using jsonp?
>
> Look at jquery and jsonp for cross domain ajax.
>  
The server I'm talking to will be sending XML, so I don't think that
jsonp is an option.

The Proxy Servlet seems to be working pretty well (so far).

-- Sean


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Plugin for Cross-Domain Ajax Proxy

Sean Gilligan-2
On 8/31/09 6:31 PM, Sean Gilligan wrote:
> The Proxy Servlet seems to be working pretty well (so far).

Over 2 years later I used the Proxy Plugin in another project.  I also
found time to push it to GitHub:
https://github.com/msgilligan/grails-proxy-plugin

No time to formally submit it right now, but there it is.

The developer of the ProxyServlet also clarified that it is under Apache
License as is the plugin.

-- Sean


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Plugin for Cross-Domain Ajax Proxy

Sean Gilligan-2
I got a nice pull request from Burt Beckwith with a ton of cleanup in it
-- thanks, Burt!   I have merged it in to the repo.  Burt suggested we
rename the plugin to the Grails Ajax Proxy Plugin.  After accepting his
changes, I renamed the repository accordingly and GitHub doesn't provide
forwarding URLs.

The new URL is https://github.com/msgilligan/grails-ajax-proxy-plugin.

-- Sean


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Plugin for Cross-Domain Ajax Proxy

ppazos
Hi Sean, this plugin is for doing request to a Grails app or from a Grails app?

I'm looking forward to a solution for calling REST services via AJAX, provided by a Grails app, from many clients in different domains.

Thanks.
Pablo Pazos
Technical Lead @ TarmacIT