I've been going crazy about this. I have Wordpress 4.6 on a IIS 7.5 Server, I am using the latest versions of the Divi template and builder by elegant themes but the builder won't work as my hosting server is blocking Cross origin Requests. The team in ElegantThemes has not been able to help me figure out the solution.
Error message I get is:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://tigerflow.com/Tigerflow/wp-admin/admin-ajax.php. (Reason: CORS header 'Access-Control-Allow-Origin' missing).
I have enabled headers through the web.config file and through the IIS Server Manager. My web.config is looking like this right now:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Headers" value="Content-Type"/>
<add name="Access-Control-Allow-Methods" value="POST,GET,OPTIONS"/>
</customHeaders>
</httpProtocol>
<rewrite>
<rules>
<rule name="wordpress" patternSyntax="Wildcard">
<match url="*"/>
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
</conditions>
<action type="Rewrite" url="index.php"/>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
I found Zehra's solution to another question about including some lines in the global.asax but I'm not sure where to look for that. Could anyone guide me? Feel free to visit the website at www.tigerflow.com
EDIT: Alin's response has been the nearest I've come to (partially) fixing my issue... when I login to the admin using www prefix I have the CORS problem... but login in directly seems to link the API correctly and everything works smoothly.