I have 2 subdomains, av.xyz.example
and video.xyz.example
. I want to enable CORS for video.xyz.example
on av.xyz.example
.
I have added the following code snippet in the apache configuration file of av.xyz.com
Header set Access-Control-Allow-Origin "video.xyz.example"`
But I get the following error
The 'Access-Control-Allow-Origin' header contains the invalid value 'video.xyz.example'. Origin 'https://video.xyz.example' is therefore not allowed access.`
I tried doing it with *
and still got an error that it is not permissible for a wildcard, tried doing it using - ^(.*\.xyz\.example)$
and still got the error, invalid value.
What should be the correct value in my scenario?
http://video.xyz.example
andhttps://video.xyz.example
are two different origins. See answer below serverfault.com/a/923220/202676