On Mon, Jun 1, 2009 at 10:30 AM, guytom<[email protected]> wrote:
>
> Hi,
>
> This is a newby question - do we have to use a proxy server to call
> the twitter REST API from a flash client?
>
> Looking at the crossdomain it seems like we do, why?
>
> Does anyone know if a simple apache reverse proxy configuration will
> do the job?
>

A simple reverse-proxy config for a webserver works just fine. I
mocked up something for work using the Search API using a
reserver-proxy config .. Make all the Ajax requests to
${original-source}/proxy/twitter/search and it works like a champ.

NameTrans fn="map" from="/proxy/twitter/search"
name="reverse-proxy-/proxy/twitter/search" to="http:/"

<Object ppath="http:*">
Service fn="proxy-retrieve" method="*"
</Object>

<Object name="reverse-proxy-/proxy/twitter/search">
ObjectType fn="http-client-config" keep-alive="false"
ObjectType fn="block-ip"
Route fn="set-origin-server" rewrite-host="true"
server="http://search.twitter.com/";
</Object>

I had to put the "block-ip" in there because something on the Twitter
side has a weird config and if I sent the X-orig-IP header or whatever
it is the twitter side returned a 500.

-steve

Reply via email to