How to release HTTP access control (CORS) of images using XMLHttpRequest for all domains below in .htaccess and not using global permission with "*":
Access-Control-Allow-Origin: http://www.osite.com.br,
https://osite.com.br, http://osite.com.br, https://subdomain.osite.com.br,
http://www.subdomain.osite.com.br
Even putting it like this, it did not work, it is giving error because of the access when I enter the domain: link does not work, when I enter link it works:
<IfModule mod_headers.c>
SetEnvIf Origin "http(s)?://(www\.)?(osite.com.br|subdomain.osite.com.br|)$" AccessControlAllowOrigin=$0
Header add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin
</IfModule>
Note: The site and the image are fictitious, just to represent the problem.