As a near final step before launching, we have activated SSL/secure pages for checkout etc and are running into the headaches it brings with cross origin requests.
We have an ajax cart function that calls, in essence:
https://shop.domain.com/checkout/cart/add/
from
http://shop.domain.com/category/product.html
Unfortunately, everything I've tried in htaccess doesn't seem to work and I think the host did not allow/enable mod_headers...
So I'm wondering if there's any PHP solution to allow http://shop.domain.com
to access https://shop.domain.com
I've tried adding:
<?php header('Access-Control-Allow-Origin: *'); ?>
To the header.php
template, but I imagine that didn't work because headers are probably processed by that point?