Page 1 of 1

Access-Control-Allow-Origin value replaced by an asterisk

PostPosted: 11. January 2012 15:00
by cescpinyol
Hi,
With PHP, I'm trying to set the header Access-Control-Allow-Origin to a given value:

<?php
header('Access-Control-Allow-Origin: http://192.168.1.10');
...

But when I get the php file from the browser, the header is set to "*"
(I'm using the "Web developer" extension for Firefox):

Date: Wed, 11 Jan 2012 12:18:13 GMT
Server: Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1
X-Powered-By: PHP/5.3.8
Content-Length: 1921
Keep-Alive: timeout=5, max=98
Connection: Keep-Alive
Content-Type: text/html
Access-Control-Allow-Origin: *
200 OK

If I don't set the header on the php file, the header is not present at the
request. It seems that the php code is considered, but not its value.

Is anyone else experiencing the same behaviour?

Thanks,

Francesc