Closed kichalla closed 9 years ago
MVC adds cors I take it? Maybe its just best to call the AddCors method instead?
@HaoK right, MVC adds Cors too...regarding calling AddCors instead I am not sure...actually this triggered some thought...this could apply to any service in general... Let's assume I call AddCors(with some option settings) and then AddMVC or any other service which also does AddCors but different options settings. Now since AddCors always does a TryAdd, the services are not overriden but in case of options the final options instance can overwrite the earlier ones...so probably that not desired?
So its a bit muddled now, but Add now does two things, it will ALWAYS configure the options, and TryAdd the services. So all of the options tweaking will always run.
For this situation though I think its fine to just call AddCors explicitly since it reads better?
In regards to the sideffects, really nothing has changed, Configure has the same behavior as calling Add does, both of them take effect in the order you call them.
@HaoK thanks, updated it now
bfe1de4819377f25ae0452280b8b06e9f7bfaacf
@HaoK