I have 2 sub domains (1 site we host one we don't) - they both have SSL certs.
api.mydomain.co.uk
(the domain we do host with a valid ssl cert)test.mydomain.co.uk
(the domain we don't host with an invalid cert but the same domain)
I have an AJAX call from test.mydomain.co.uk
to api.mydomain.co.uk
. Now obviously I get a No 'Access-Control-Allow-Origin' header is present on the requested resource error which I would expect.
But then a put document.domain = "mydomain.co.uk"
in the code on test.mydomain.co.uk
.
I thought that would solve the issue (I've never done this before though) as it is a subdomain. So my question is - is the invalid SSL causing a problem, or do I need to do something more like CORS etc?