[Solved] Page loaded over HTTPS but requested an insecure XMLHttpRequest endpoint

I have a page with some D3 javascript on. This page sits within a HTTPS website, but the certificate is self-signed.

When I load the page, my D3 visualisations do not show, and I get the error:

Mixed Content: The page at ‘‘ was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint ‘‘. This request has been blocked; the content must be served over HTTPS.

I did some research and all I found what the JavaScript will make the call with the same protocol that the page was loaded. So if page was loaded via https then the rdata.csv should also have been requested via https, instead it is requested as http.

Is this because the certificate is self-signed on the server? What I can do to fix this, other than installing a real SSL certificate?

Enquirer: J86


Solution #1:

What I can do to fix this (other than installing a real SSL certificate).

You can’t.

On an https webpage you can only make AJAX request to https webpage (With a certificate trusted by the browser, if you use a self-signed one, it will not work for your visitors)

Respondent: Tom

Solution #2:

I had the same issue for my angular project, then I make it work in Chrome by changing the setting. Go to Chrome setting –>site setting –>Insecure content –> click add button of allow, then add your domain name

Now problem will be solved.

Respondent: user2791178

Solution #3:

I had the same problem but from IIS in visual studio, I went to project properties -> Web -> and project url change http to https

Solution #4:

I solved the problem adding a slash at the end of the requesting url

This way: ‘/data/180/’
instead of: ‘/data/180’

Respondent: Flavio Lopes

Solution #5:

Try to add a s after http

Like this: =>

It works for me

Respondent: Abdul Samad

Solution #6:

this is easy,
if you use .htaccess , check http: for https: ,
if you use codeigniter, check config : url_base -> you url http change for https…..
I solved my problem.

Respondent: Wilmer

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Most Popular

To Top
India and Pakistan’s steroid-soaked rhetoric over Kashmir will come back to haunt them both clenbuterol australia bossier man pleads guilty for leadership role in anabolic steriod distribution conspiracy