1. I confirmed mod_headers is enabled by doing
apachectl -M
That command showed headers_module (shared)
2. My main httpd file includes:
<Directory "/">
AllowOverride All
Options ExecCGI Indexes IncludesNOEXEC FollowSymLinks
</Directory>
I read in a thread that AllowOverride All might be needed for cross domain stuff to work.
3. I made the following small .htaccess file
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
and placed it in this directory:
My goal is to be able to run PHP scripts located elsewhere and have them be able to access PHP code in the above directory. But I keep getting the error
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://192.163.244.163/_findmesar/php_get_elevation.php?lat=47.713485&lon=-122.067354. (Reason: CORS header ‘Access-Control-Allow-Origin' missing).
Any suggestion for what I am missing?
apachectl -M
That command showed headers_module (shared)
2. My main httpd file includes:
<Directory "/">
AllowOverride All
Options ExecCGI Indexes IncludesNOEXEC FollowSymLinks
</Directory>
I read in a thread that AllowOverride All might be needed for cross domain stuff to work.
3. I made the following small .htaccess file
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
and placed it in this directory:
My goal is to be able to run PHP scripts located elsewhere and have them be able to access PHP code in the above directory. But I keep getting the error
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://192.163.244.163/_findmesar/php_get_elevation.php?lat=47.713485&lon=-122.067354. (Reason: CORS header ‘Access-Control-Allow-Origin' missing).
Any suggestion for what I am missing?
Last edited by a moderator: