EnableCorsAttribute
Attribute marks that specific response class has support for Cross-origin resource sharing (CORS, see http://www.w3.org/TR/access-control/). CORS allows to access resources from different domain which usually forbidden by origin policy.
Assembly: ServiceStack.dll
View Source
Declaration
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public class EnableCorsAttribute : AttributeBase, _Attribute, IHasRequestFilterAsync, IRequestFilterBase
Properties
Priority
View Source
Declaration
public int Priority { get; set; }
AutoHandleOptionRequests
View Source
Declaration
public bool AutoHandleOptionRequests { get; set; }
Methods
RequestFilterAsync(IRequest, IResponse, Object)
View Source
Declaration
public Task RequestFilterAsync(IRequest req, IResponse res, object requestDto)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
ServiceStack.Web.IResponse | res |
System.Object | requestDto |
Copy()
View Source
Declaration
public IRequestFilterBase Copy()
Returns
ServiceStack.Web.IRequestFilterBase
Implements
System.Runtime.InteropServices._Attribute
- ServiceStack.Web.IHasRequestFilterAsync
- ServiceStack.Web.IRequestFilterBase