On Wed, Dec 10, 2008 at 3:19 PM, Matt Wilson <[EMAIL PROTECTED]> wrote: > On Dec 5, 8:30 am, Teemu Ikonen <[EMAIL PROTECTED]> wrote: >> I need a simple proxy controller for a paste-deployed pylons app. >> Simple means taking URLs of the form "/proxy?url=http://example.com" >> and returning the unmodified reply from example.com. >> >> I could hack something together on the WSGI-level, but I would rather >> not reinvent the wheel if there is an elegant solution using webob >> objects. > > If I had to do this, I would use something like urllib2.urlopen. > > If performance matters, you might want to play with caching the data. > > But why not open an iframe on the client? Why proxy? > > I'm curious about what WSGI stuff you would try.
Hi, My objective is to get around the same origin policy to make AJAX calls to another host. One way to do this is to route the requests through a proxy on the original server. Could I somehow use an iframe to get around this (I'm really a newbie on this stuff)? Currently I'm thinking of writing a controller which gets the URL from a query parameter, constructs a new Request, calls paste.proxy with it and returns the Response from the proxy. This probably can be made to work, but I'm not terribly happy with this solution, so if anyone has a better idea, please let me know. Teemu --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
