Ends in:
4 DAYS
5 HRS
34 MIN
24 SEC
Ends in:
4 D
5 H
34 M
24 S
Open Closed

How to configure CORS? #1345


User avatar
0
hansmogren created

Hi!

In the identity server user interface we can provide allowed cors origins for our clients. Is this supposed to work out-of-the-box or do we need to add code anywhere? Do we need to add the CORS middleware ourselves, and in that case how do we connect it to the clients and origins stored in the IdentityServerClientCorsOrigins table?

  • ABP Framework version: v4.3.0
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:

5 Answer(s)
  • User Avatar
    0
    alper created
    Support Team Director

    CORS works but you need to add the production server addresses when you deploy. Also you need to configure IdentityServerClientRedirectUris db table (this is probably configured from the UI)

  • User Avatar
    0
    dwoodard created

    I have a very similar problem. What document covers adding the production servers? Where do I add them?

  • User Avatar
    0
    hansmogren created

    CORS works but you need to add the production server addresses when you deploy. Also you need to configure IdentityServerClientRedirectUris db table (this is probably configured from the UI)

    Thanks for answering. I've added the addresses in the "allowed cors origins" dialog, is there somewhere else they should go? What configuration needs to be done with the IdentityServerClientRedirectUris table?

  • User Avatar
    0
    alper created
    Support Team Director

    the application template comes preconfigured to run Identity Server on your local environment. you need to change the local URLs to your production addresses. check the IdentityServerClientRedirectUris table, you'll see the localhost addresses, replace them with your prod addresses

  • User Avatar
    0
    ServiceBot created
    Support Team Automatic process manager

    This question has been automatically marked as stale because it has not had recent activity.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 28, 2024, 07:27