Skip to main content

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
TypeName
ServiceStack.Web.IRequestreq
ServiceStack.Web.IResponseres
System.ObjectrequestDto

Copy()

View Source
Declaration
public IRequestFilterBase Copy()
Returns

ServiceStack.Web.IRequestFilterBase

Implements