How to solve 'Redirect has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header'? IIS

if you get into this error " IIS has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status."

 Install this extension

and add this to web.config

        <add name="Access-Control-Allow-Origin" value="http://website_name" />
        <add name="Access-Control-Allow-Credentials" value="true" />
        <add name="Access-Control-Request-Headers" value="User-Agent,Content-Type,Authorization,X-RequestDigest,X-ClientService-ClientTag" />
        <add name="Access-Control-Request-Method" value="GET,POST,HEAD,OPTIONS" />

දිරියක් වෙන්න අදහස් පෙළක් දාන්න

Post a Comment (0)
Previous Post Next Post