programmers-proverbs
programmers-proverbs copied to clipboard
Can't access random through Ajax
How can I access the random proverb generator through ajax? I'm having a No 'Access -Control-Allow-Origin' error.
This can be fixed by allowing CORS on the server which can only be configure by @AntJanus. If that's impossible, another way is to setup a proxy on your server that will make a request to the generator and use it on your ajax request.
I'll go ahead and get that setup! I'll update when I'm done.
Another solution is jsonp but the output must be on json to avoid some error.