Ajax 跨域请求

<system.webServer>
    <httpProtocol>
      <!--<customHeaders>
        <add name="Access-Control-Allow-Origin" value="*" />
        <add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE" />
      </customHeaders>-->
      <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>

 

posted @ 2017-09-19 09:24  码到世界末日  阅读(197)  评论(0编辑  收藏  举报