SOLVED SORTA Cross-Origin Request Blocked - Obviously I am missing something
1. I confirmed mod_headers is enabled by doing
apachectl -M
That command showed headers_module (shared)
2. My main httpd file includes:
AllowOverride All
Options ExecCGI Indexes IncludesNOEXEC FollowSymLinks
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
Header set Access-Control-Allow-Origin "*"
and placed it in this directory:
. (Reason: CORS header "Access-Control-Allow-Origin' missing).
Any suggestion for what I am missing?
-
I think this is an SSL issue and the CORS error message was misleading. I am using a free SSL cert from Lets Encrypt. Those certs cannot include IP addresses. I lauched an html page from a Firefox tab and that page requested some PHP code from my IP address. It was that request which caused the CORS error message. 0 -
Hey there! In general, we don't recommend trying to run code from Domain A on Domain B, as setting up the permissions to work with that will lead to security problems or server errors. 0
Please sign in to leave a comment.
Comments
2 comments