[TYPO3-typo3org] Reading JSON from Forge
Kay Strobach
typo3 at kay-strobach.de
Wed Mar 28 07:20:32 CEST 2012
Hi François,
you need an JavaScript Proxy on your origin server (the one where your
js file is located), as ajay requests are only allowed to the same
origin ;) - Called "Same origin policy"
https://github.com/hugeinc/ajax-proxy
http://codefury.net/2010/06/ajax-proxy-a-php-ajax-proxy-with-cookie-support/
Regards
Kay
Am 27.03.2012 21:35, schrieb François Suter:
> Hi,
>
> I'm trying to read some JSON data from Forge, more precisely an issue
> (e.g. http://forge.typo3.org/issues/10322.json). I can read that
> perfectly well with a browser, but if I try to get the content using
> jQuery.get(), my request gets blocked with the following message:
>
> XMLHttpRequest cannot load http://forge.typo3.org/issues/10322.json.
> Origin http://www.foobar.com is not allowed by Access-Control-Allow-Origin.
>
> What is this due to and how can I read Forge JSON data from a JS
> application?
>
> Cheers
>
--
http://www.kay-strobach.de - Open Source Rocks
TYPO3 .... inspiring people to share!
Get involved: http://typo3.org
Answer was useful: https://flattr.com/profile/kaystrobach
More information about the TYPO3-team-typo3org
mailing list