The enhancement to decisively include CORS configuration dynamically will prove to be good move in new release of .net framework. Yes, the resource sharing across different services such twitter, facebook and many more. Its a way to allow resource across domain depending upon the level of interaction. The point is not to narrate many things here. To keep discussion short and up to point. VS2013 and MVC5 preview release has gotten into new innovation to configure CORS dynamically.
Highlights we can have:
Now we can configure CORS via database . No require to restart service. Client access can be configured at runtime.
public interface ICorsPolicyProvider
Highlights we can have:
Now we can configure CORS via database . No require to restart service. Client access can be configured at runtime.
public interface ICorsPolicyProvider
7: {
8: ///
9: /// Gets the.
10: ///
11: /// The request.
12: /// The cancellation token.
13: ///The .
14: TaskGetCorsPolicyAsync(HttpRequestMessage request, CancellationToken cancellationToken);
15: }
Important Attributes that can be applied to controller methods.
[EnableCors("*", "*", "*")]
[DisableCors]
For more details check this out. MSDN Blog
No comments :
Post a Comment