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 Asynchronous Programming with JavaScript Asynchronous JavaScript with Callbacks Async Programming and Callback Functions

Any easy work around for the http/https mixed content error?

Or do I just have to watch the videos without following along?

Could I just make the json file locally and still follow along?

2 Answers

James Edens
James Edens
723 Points

You have to adjust your browser settings to allowed mixed content. Us this link chrome://settings/content/all to open the Site Settings page, then search for Treehouse, You will see a site that said 'treehouse-app.net", click the arrow to the right. Now you have to find the link for the app you are currently using. This is the URL of the page you opened up when you clicked View in the workspace, so the URL of the page you are trying to view the names from. Scroll down to insecure content and select ALLOW.

As an alternative you can try this link chrome://settings/content/siteDetails?site=REPLACE-THIS-WITH-THE-URL to take you directly to the settings page. So it will SIMILAR like this, but with a different URL chrome://settings/content/siteDetails?site=https://port-80-z4wh0lm6c8.ecs-production.treehouse-app.net

It is NOT recommended to change this setting to allowed on a global basis, just for the site you need it work for. After changing it, you will still get get a mixed content WARNING, instead of an error, it will say "You should disable this" instad of saying "It's been blocked"

Darian Ross
Darian Ross
10,353 Points

Thanks!! I was wrecking my brain trying to figure out. In Chrome, I chose the "View Site Information" button, right inside the URL text area, just in front of the domain name then on that drop down I hit "Site Settings". Then scrolled down to Insecure Content and chose ALLOW. My page for using the Workspace is "https://port-80-s3v0g1e3pc.ecs-production.treehouse-app.net/"

It still gives the following information at the top of the Console, but the JSON Array shows up now.

https://port-80-s3v0g1e3pc.ecs-production.treehouse-app.net/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://api.open-notify.org/astros.json'. This content should also be served over HTTPS.

The api url for http://api.open-notify.org/astros.json is http while the treehouse workspace is https so the api endpoint is blocked do to CORS policy I guess. I just made the json locally and it works fine at the moment.