Open PioneerOfProgramming opened 1 year ago
Just update the CorsOrigin list in appsettings.json.
@berkansasmaz No I meant manually by code
For this, you can see how it is configured in the startup templates.
For instance:
You can search for the ConfigureCors
method in the source code of the startup template you use and configure it similarly.
@berkansasmaz I need when the server running online to add new domains for new tenants... so i can not predicate how they will add their domains, so i want a way to add those domains to cors orgins everything was okay, but when i use two server...the cors origin add it on app but not add it on auth server as i mention it above
I understand your problem, first of all sorry for the late reply, I missed it. Also, thank you for your detailed explanation. 🙏
For this, I can suggest you to publish a distributed event or make a direct HTTP request. You can publish an event or send an HTTP request to the auth-server so that it will be triggered every time a new domain is added or CORS is added. Then, you can handle it in the Auth-Server as it is handled in the Host application. Your question is clear, but I have a little thought, why doesn't it work when we add https://*.berkansasmaz.com
to CORS? When you say Tenant's domain, does not only the subdomain change, do you have a different solution?
@berkansasmaz Thanks for your suggestion and i implemented when CORS is added I send an HTTP request to the auth-server. But I face new problem how to know if request authorized when reach to auth-server?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Is there an existing issue for this?
Description
I want to add custom cors origin the matters went well when I was working on one app after I upgraded ABP to 7.2V and separated my project into two apps HttpApi.Host app in AuthServer app, I am stuck in this problem of how to add the cors origin as same as from the host app to auth server app this is my code to add Cors origin in the host app
Reproduction Steps
No response
Expected behavior
No response
Actual behavior
No response
Regression?
No response
Known Workarounds
No response
Version
7.2
User Interface
Angular
Database Provider
EF Core (Default)
Tiered or separate authentication server
Separate Auth Server
Operation System
Windows (Default)
Other information
No response