We have a DNN website, let's call it "site A" and we are fetching a webchat JS file from another server, let's say "site B". We bought a Certificate that matches on both Site A and Site B in the IIS 10 bindings.
We have attempted to add the following code to site A, with no success as we get a CORS error.
<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="GET,POST,PUT,DELETE,OPTIONS" />
<add name="Access-Control-Allow-Credentials" value="true" />
</customHeaders>
</httpProtocol>
</system.webServer>
I would like to know, on which site should we add the Access Control Allow Origin code and is it possible to only target a specific DNN Portal to allow this? Is there a way you can inject Custom Headers in a particular Portal?