Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Safari 9 disallowed running of insecure content?

after upgrading to Safari 9 I'm getting this error in the browser:

[Warning] [blocked] The page at https://localhost:8443/login was not allowed to run insecure content from http://localhost:8080/assets/static/script.js.

Anyone knows how to enable the running of insecure content on the new Safari?

like image 433
Staelen Avatar asked Oct 01 '15 08:10

Staelen


People also ask

How to allow Safari to load insecure content?

Open the Preferences dialog by selecting "Preferences" from the "Safari" menu. Select the "Security" icon near the top of the dialog. Ensure that the "Ask before sending a non-secure form to a secure website" option is unchecked.

How do I allow mixed content on Safari?

Try allowing the cookies. Safari > Preferences > Privacy > Cookies and website data: Select "Always allow". When you are done with the site, revert back to the default setting.


2 Answers

According to the Apple support forums Safari does not allow you to disable the block on mixed content.

Though this is frustrating for usability in legitimate cases like yours, it seems to be part of their effort to force secure content serving / content serving best practices.

As a solution for you you can either upgrade the HTTP connection to HTTPS (which it seems you have done) or proxy your content through an HTTPS connection with an HTTPS-enabled service (or, in your case, port).

like image 163
winhowes Avatar answered Oct 17 '22 09:10

winhowes


You can fix the HTTPS problem by using HTTPS locally with a self signed SSL certificate. Heroku has a great how-to article about generating one.

After setting up SSL on all of your development servers, you will still get an error loading the resource in Safari since an untrusted certificate is being used(self signed SSL certificates are not trusted by browsers by default because they cannot be verified with a trusted authority). To fix this, you can load the problematic URL in a new tab in Safari and the browser will prompt you to allow access. If you click "Show Certificate" in the prompt, there will be a checkbox in the certificate details view to "Always allow content from localhost". Checking this before allowing access will store the setting in Safari for the future. After allowing access just reload the page originally exhibiting a problem and you should be good to go.

This is a valid use case as a developer but please make sure you fully understand the security implications and risks you are adding to your system by making this change!

like image 35
munsellj Avatar answered Oct 17 '22 10:10

munsellj