Why Use the Proxy?

The same-origin policy is a security restriction on what web content JavaScript code can interact with. Essentially, it dictates that a running script can only interact with data coming from the same origin as the server hosting the page or application upon which the code is running. This is especially important for applications using AJAX (Asynchronous JavaScript and XML) techniques like JavaScript API as it means that our requests may only be made back to the host server.

The JavaScript API requires a proxy in order to work around those security restrictions. The following sections describe why this is necessary and how a proxy can be used for your own application development.