Some weeks ago I have moved a homepage to https only and also enabled HSTS. On one page I have some JavaScript code that got its content from a subdomain via a http-request. Before https was enabled this worked well. I also changed the http protocol to https in the javascript code. But this was not a solution.
Does HTTPS restrict access to a subdomain or is it HSTS?
Is there a way to allow access to subdomains?
Here ist the JavaScript-Code:
<script type="text/javascript" src="/jquery-1.11.0.min.js"></script>
<script>
$("#ipv4").show().load('https://ipv4.mydomain.com/myip/'
, {limit: 25},
function (responseText, textStatus, req) {
if (textStatus == "error") {
$("#ipv4").html("Kein IPv4");
}
}
);
$("#ipv6").show().load('https://ipv6.mydomain.com/myip/'
, {limit: 25},
function (responseText, textStatus, req) {
if (textStatus == "error") {
$("#ipv6").html("Kein IPv6");
}
}
);
</script>
And this is the HSTS-Header:
Strict-Transport-Security: max-age=31556926; includeSubDomains; preload