Base solution for your next web application
Open Closed

CORS policy execution failed #10110


User avatar
0
gunpaljain created

Hello,

this question may be unrelated to aspnetzero. But I am struggling to solve an issue with the my web app.

My web app is serving couple of chrome extensions. Everything seems to be working fine on chrome extensions. but I am seeing lot of log entries for Failed CORS policy:

2021-02-22 12:59:57,479 [193 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 POST http://api.leadblasta.com/app-signalr?enc_auth_token=null&id=IXvvba6D6njGCl3mf-IlNw text/plain;charset=UTF-8 11 INFO 2021-02-22 12:59:57,480 [193 ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution failed. INFO 2021-02-22 12:59:57,480 [193 ] pNetCore.Cors.Infrastructure.CorsService - Request origin chrome-extension://meajddjijmeaibppajnagjiloknomjjp does not have permission to access the resource.

https://prnt.sc/103pnem

I have already added CorsOrigins chrome-extension://* into appsettings

"CorsOrigins": "http://*.leadblasta.com,https://*.leadblasta.com,https://app.leadblasta.com,http://app.leadblasta.com,http://localhost:4200,http://localhost:4220,chrome-extension://*",

If anyone can help me resolve this issue, then I will be very thankful.

Edited: Production Angular app also started to give the CORS error

Regards, Gunpal Jain


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @gunpaljain

    1. Could you check server side log file to see if there are any errors ?
    2. Does your Angular app work when you remove chrome-extension://* from CORS setting ?