Open Closed

5.3.4 microservice template CORS errors #3785


User avatar
0
steve.burgess created
  • ABP Framework version: v5.3.4
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Hi, i'm seeing CORS errors in the log files for the 5.3.4 microservice template. This is happening for all of the services.

It's not causing any issues and everything works as expected, it's just filling the log file with noise as it happens a lot.

The services (saas, administration, identity, product) only have the Web Gateways in there CorsOrigins configuration. The Web Gateways then have the frontend in their CorsOrigin. So when it goes "frontend -> gateway -> service" i assume Ocelot is passing the Origin as the frontend and that's causing the error?

Is there a way around this? Or do i just need to add the frontends to the services CorsOrigins to stop the errors?

Cheers,

Steve.


4 Answer(s)
  • User Avatar
    0
    malik.masis created

    Hi Steve,

    We're aware of that, but it's related to Microsoft UseCors middleware, not ABP Framework. Also, you don't need to add the frontends to any service. Because services should access to gateway not the front end side.

    Regards.

  • User Avatar
    0
    steve.burgess created

    Hi Steve,

    We're aware of that, but it's related to Microsoft UseCors middleware, not ABP Framework. Also, you don't need to add the frontends to any service. Because services should access to gateway not the front end side.

    Regards.

    So, just to confirm, this is expected?

    Are there any work arounds or do we just have to live with it outputting errors into the logs?

    Thanks,

    Steve.

  • User Avatar
    0
    malik.masis created

    Hi Steve,

    I see. You can change the level of the logs. Btw, these are not error logs. Their level is info.

    Regards.

  • User Avatar
    0
    steve.burgess created

    Hi,

    OK, thanks for letting me know. I'll mark this as answered.

    Thanks again.

    Steve.

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11