Webconfig file for wordpress install and enabling cors

Discussion in 'Windows / IIS' started by Aaron Ludo, Dec 16, 2015.

  1. So I had a webconfig file that was used to enable CORS for one of my websites, after installing wordpress this file is now used for the wordpress configuration and has impacted the functionality of the site that requires CORS. When I try to add the following code to the file:

    <system.webServer>
    <httpProtocol>
    <customerHeaders>
    <add name="Access-Control-Allow-Origin" value="*" />
    </customerHeaders>
    </httpProtocol>
    </system.webServer>

    The wordpress site returns an error.

    How can I set up the webconfig file for both the wordpress install and enable CORS for specific domain?
     
  2. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

Share This Page