what is difference between shindig openproxy and makerequest

218 views Asked by At

I looked at the shindig source, the proxyservlet and makerequestservlet and their handlers have a lot in common, so what's the difference between them? when to use the proxyservlet? We've been using makerequest mainly. Should the proxyservlet require a securetoken when being called?

the only doc i could find on proxyservlet is "The open proxy (used for embedding rewritten content such as image urls)". not too helpful.

thanks

1

There are 1 answers

0
Ryan Baxter On

The ProxyServlet class is what we refer to as the "content proxy" while the MakeRequestServlet is what we refer to as the "make request proxy". The content proxy is used to fetch resources for the gadget such as CSS, JavaScript, and images. Scipt, link, and image tags in your gadget's HTML will be rewritten to go through this proxy. There is some caching in the proxy that, in theory, will lessen the load on the resource servers.

The make request proxy is called when a gadget uses the gadgets.io.makeRequest API to fetch data. This proxy requires a security token (while the content proxy does not) and allows users to use OAuth.