sidor2
1
Hi,
I am having a problem running my Random Quote Generator on Codepen: https://codepen.io/sidor2/pen/JOMpgL?editors=1010.
It does work in VS Code and in JS bin. I tried adding and removing different libraries but without success. I would appreciate any help.
Hi
I ran into a similar problem, my pen worked and then didn’t!
I think this was down to codepen changing policy about loading only over https in my case. It took my a while to figure out why.
try changing your request to: https://cors-anywhere.herokuapp.com/http://quotes.stormconsultancy.co.uk/quotes/random.json
ref: https://github.com/Rob–W/cors-anywhere/#documentation
If you open the web dev tools in the browser when loading your pen (or clicking the button) you are generating an error in the console:
GET https://quotes.stormconsultancy.co.uk/random.json net::ERR_INSECURE_RESPONSE
I’m not sure if this is the best work around, but it worked for me 
my pen for reference: https://codepen.io/phatbhoy67/pen/YVyvXQ
sidor2
3
Thank you very much for your help! It worked instantly. Happy coding!