title: Page loaded over HTTPS but requested an insecure XMLHttpRequest endpoint
body: <p>I have a page with some D3 javascript on. This page sits within a HTTPS website, but the certificate is self-signed.</p>
  
  <p>When I load the page, my D3 visualisations do not show, and I get the error:</p>
  
  <blockquote>
    <p>Mixed Content: The page at '<a href="https://integration.jsite.com/data/vis" rel="noreferrer">https://integration.jsite.com/data/vis</a>' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint '<a href="http://integration.jsite.com/data/rdata.csv" rel="noreferrer">http://integration.jsite.com/data/rdata.csv</a>'. This request has been blocked; the content must be served over HTTPS.</p>
  </blockquote>
  
  <p>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 <code>https</code> then the <strong>rdata.csv</strong> should also have been requested via <code>https</code>, instead it is requested as <code>http</code>.</p>
  
  <p>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?</p>