I have created web api using entity framework asp.net
but when I wanted get data from the same api from another domain got the following error.
No Access-Control-Allow-Origin header is present on the requested resource.
I searched in the google and there are many solutions but I couldn't understand what is the more secure method for this allow and below is one of them
<system.webServer>
<httpProtocol>
<customHeaders>
<!-- Adding the following custom HttpHeader
will help prevent CORS from stopping the Request-->
<add name="Access-Control-Allow-Origin" value="*" />
</customHeaders>
</httpProtocol>
</system.webServer>