WebSite X5Help Center

 
Dave Johnson
Dave Johnson
User

SSL Mixed Content - No Green Bar - Solution  en

Autor: Dave Johnson
Visited 939, Followers 1, Udostępniony 0  

I didn't find many contributions on the topic of SSL in this forum, so I thought I might share my findings.

Enabling SSL will likely lead to a Mixed Content error for one or more objects on your site, especially if the objects are not located on your actual site. In my case, I have objects located on Amazon S3 that I link to.

Getting rid of the Mixed Content errors led to a fruitless search for a quick fix. Most tools on the open market assist with WordPress sites.

Finally I discovered a one-liner fix and voilà, the Green Bar suddenly appeared.

Here is the fix, and my idea for Website X5 would be to incorporate this as a toggle switch of sorts:

In the site Header, simply add this line:

<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">

Posted on the
2 ODPOWIEDZI
Claudio D.
Claudio D.
Moderator
Najlepszy Użytkownik miesiąca IT

surprised

Hi !

if I understand what you mean...

I'm afraid but...

It does not work and cannot work.

The purpose of that statement is  to simplify the transition from http to https , and so to declare that browsers should transparently upgrade HTTP resources on a website to HTTPS...

...not passing off http content as https content.

are you sure you did the test with http content?
I think they were https content and therefore that statement seems to work.

You can't fool new browsers and the http content will not be shown on https site.

bye

................................

Ciao

se ho capito cosa intendi...

Mi spiace ma ...

Non funziona e non può funzionare.

Lo scopo di quell'istruzione è semplificare il passaggio da http a https dicendo al browser di mostrare contenuti http com https , poichè anche se scritti come http sono in realtà https...

... non certo per "spacciare" contenuti HTTP come HTTPS.

Sei sicuro di aver fatto la prova con contenuti http ?
penso fossero contenuti https e quindi quell'istruzione sembra funzionare

Non puoi ingannare i nuovi browser ed il contenuto http non verrà mostrato su siti in https.

ciao

Czytaj więcej
Posted on the from Claudio D.
Aleksej H.
Aleksej H.
Moderator

Hello.

"Enabling SSL will likely lead to a Mixed Content error for one or more objects on your site" - Here is a demo site.It seems that there is no problem described by you. I did not add special tags to the code. I used the settings on my hosting and that’s it.

Czytaj więcej
Posted on the from Aleksej H.