Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Olga Mendenhall
Olga Mendenhall
8,809 Points

AJAX Flickr photo search doesn't work on GitHub, but works on CodePen

AJAX Flickr Photo Search works well on CodePen http://codepen.io/Olti/pen/LbdeZR but on GitHub https://olgamendenhall.github.io/flickr-search-form/ I'm getting first "Mixed Content: The page at 'https://olgamendenhall.github.io/flickr-search-form/' was loaded over HTTPS, but requested an insecure stylesheet 'http://fonts.googleapis.com/css?family=Varela+Round'. This request has been blocked; the content must be served over HTTPS." and when I'm trying to search for an animal it says: "Failed to load resource: the server responded with a status of 503", "XMLHttpRequest cannot load https://cr-input.mxpnl.net/data?_channel_id=&_partner_id=39571&_sub_id=0000&_app_version=1.0.23&_app=cs-dca. No 'Access-Control-Allow-Origin' header is present on the requested resource." Please help!

2 Answers

Stephen Gheysens
Stephen Gheysens
11,935 Points

Hi Olga Mendenhall ,

As for the 'Mixed Content' error, you need to change the source URL for the font and jQuery to start with 'https'. It's throwing that error because you're loading a resource from a regular http connection on an https page.

I'm not sure what is wrong with the AJAX request, because according to this StackOverflow post, you should be able to. Once you change the source URLs, post back if you're still receiving the CORS error!

Olga Mendenhall
Olga Mendenhall
8,809 Points

Thank you so much, Stephen!!! :)))) It works!!! I've changed the URL source in index.html and also in app.js file and it works!!!! Warm regards, Olga :)