Mozilla サポートの検索

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

My api url is giving me CORS Error in firefox, but in other browser there is no error.

  • 返信なし
  • 0 人がこの問題に困っています
  • 5 回表示
more options

My API URL is giving me CORS Error in Mozilla Firefox, but in other browser there is no error. I have tried many methods like changing the about:config but it didn't make any difference. Its been days I am facing this issue. Kindly help. Thanks in Advance.

FRONTEND : Angular. BACKEND : Dotnet core API.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at <MY WEB API URL>. (Reason: CORS request did not succeed). Status code: (null). Dotnet code for API services.AddCors(o => o.AddPolicy("MyPolicy", addcors =>

           {
               addcors.AllowAnyOrigin()
                   .AllowAnyMethod()
                   .AllowAnyHeader();
           }));

app.UseCors("MyPolicy");

My API URL is giving me CORS Error in Mozilla Firefox, but in other browser there is no error. I have tried many methods like changing the '''about:config''' but it didn't make any difference. Its been days I am facing this issue. Kindly help. Thanks in Advance. FRONTEND : Angular. BACKEND : Dotnet core API. Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at <MY WEB API URL>. (Reason: CORS request did not succeed). Status code: (null). '' Dotnet code for API services.AddCors(o => o.AddPolicy("MyPolicy", addcors => { addcors.AllowAnyOrigin() .AllowAnyMethod() .AllowAnyHeader(); })); app.UseCors("MyPolicy");''
添付されたスクリーンショット

投稿に返信するには あなたのアカウントにログイン する必要があります。まだアカウントをお持ちでなければ、新しい質問を開始 してください。