Discussion:
Access-Control-Allow-Origin header missing?
r***@charter.net
2014-01-24 20:00:46 UTC
Permalink
I have the following code to add the appropriate header then redirect
but I am still getting an error that this header is missing. What am I
doing wrong?

header("HTTP/1.1 301 Moved Permanently");
header("Access-Control-Allow-Origin:
http://".$_SERVER['HTTP_HOST']);
$augmentedUrl = $playbackbase."?authTicket=$authTicket";
header("Location: $augmentedUrl");

Thank you.
Aziz Saleh
2014-01-24 20:07:32 UTC
Permalink
HTTP_HOST always has origin access to resources afaik (unless you are using
subdomains that is), just confirm that it is the host you want to give
access to. Besides that I think you want to have that access control @
$playbackbase url as well.

Aziz
I have the following code to add the appropriate header then redirect but
I am still getting an error that this header is missing. What am I doing
wrong?
header("HTTP/1.1 301 Moved Permanently");
header("Access-Control-Allow-Origin: http://
".$_SERVER['HTTP_HOST']);
$augmentedUrl = $playbackbase."?authTicket=$authTicket";
header("Location: $augmentedUrl");
Thank you.
Continue reading on narkive:
Loading...