aspnet / CORS

[Archived] Implementations of common CORS policy and CORS middleware. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
90 stars 46 forks source link

Inject ICorsPolicyProvider instance through Invoke #202

Closed pranavkm closed 6 years ago

pranavkm commented 6 years ago

This allows for scoped instances of ICorsPolicyProvider to be injected in the CORS middleware and prevents turning them into singletons.

Resolves https://github.com/aspnet/AspNetCore/issues/2377

pranavkm commented 6 years ago

Updated version of https://github.com/aspnet/CORS/pull/106

pranavkm commented 6 years ago

The code's pretty identical to the original PR. I think there's plans for better design here but merging this in before the repo gets mondo-repoed.