I am trying to use a regular expression with cors. I have read many times that this is not possible that cors is all (*) or exact domains. Access-Control-Allow-Origin wildcard subdomains, ports and protocols . However this seems to contradict :http://www.cameronstokes.com/2010/12/26/cross-origin-resource-sharing-and-apache-httpd/. Could somebody clarify and if using a regular expression is possible provide a simple example as I have tried to implement the link above but with no success.
The regular expression is wish to use is
^http\://\blocal-.*\b\.testing-test:10005$
I have checked my regex and it matches the generated URLs. I have added SetEnvIF and Header set lines as suggested to my apache2.conf (is this correct?) as follows
SetEnvIf Origin "^http\://\blocal-.*\b\.mycompany-it:10005$"
AccessControlAllowOrigin=$0 Header add Access-Control-Allow-Origin %
{AccessControlAllowOrigin}e env=AccessControlAllowOrigin
I am lost as to what to do next.It doesn't work Thanks in advance