mardi 3 novembre 2015

Define Access-Control-Allow-Origin in web.config for IIS6

For IIS7 web.config should look like:

<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="GET, POST, PUT, DELETE, OPTIONS" />
      </customHeaders>
     </httpProtocol>
    </system.webServer>
</configuration>

But how to deal with IIS6? Currently I have:

<configuration>
  <system.web>
      <compilation debug="true" targetFramework="4.5" />
      <httpRuntime targetFramework="4.5" />
    </system.web>
</configuration>

How to defin Access-Control-Allow there ?

Aucun commentaire:

Enregistrer un commentaire