Sunday, August 11, 2019

Access control allowed or cors allow

1. Access-Control-Allow-Origin
2.Access-Control-Allow-Headers
3.Access-Control-Allow-Methods
all allowed globaly (in web.config)

  <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>

No comments:

Post a Comment

Linq Expression syntax for where condtion in linq

(Expression<Func<T, bool>> filter)