Page 1 of 1

HELP ME LINK HTTP ON VPS HTTPS

PostPosted:04 Jul 2019 12:46
by MacKen
Mixed Content: The page at 'https://' was loaded over HTTPS, but requested an insecure resource 'http://'. This request has been blocked; the content must be served over HTTPS.


HELP PLZ

EX file doc.php
Code: Select all
<?php
    if (isset($_GET['url']) && $_GET['url']) {
    	$file = $_GET['url'];
    	$head = array_change_key_case(get_headers($file, TRUE));
    	$size = $head['content-length'];
    	header('Content-Type: application/javascript');
    	header('Accept-Ranges: bytes');
    	header('Content-Disposition: inline');
    	header('Content-Length:'.$size);
    	readfile($file);
    }
    exit;
?>
LINK EX: https://a.com/doc.php?url=http://b.com/file.js << VERY GOOD


CODE index.html
Code: Select all
<script src="https://a.com/doc.php?url=http://b.com/file.js"></script>
Erorr :

Mixed Content: The page at 'https://a.com/index.html' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://b.com/file.js'. This request has been blocked; the content must be served over HTTPS.