Skip to main content

CorsFeature

Plugin adds 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
public class CorsFeature : IPlugin, IHasStringId, IHasId<string>

Properties​

Id​

View Source​
Declaration
public string Id { get; set; }

AllowOriginWhitelist​

View Source​
Declaration
public ICollection<string> AllowOriginWhitelist { get; }

AutoHandleOptionsRequests​

View Source​
Declaration
public bool AutoHandleOptionsRequests { get; set; }

Fields​

DefaultOrigin​

View Source​
Declaration
public const string DefaultOrigin = "*"

DefaultMethods​

View Source​
Declaration
public const string DefaultMethods = "GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD"

DefaultHeaders​

View Source​
Declaration
public const string DefaultHeaders = "Content-Type"

DefaultMaxAge​

View Source​
Declaration
public const int DefaultMaxAge = 600

Methods​

Register(IAppHost)​

View Source​
Declaration
public void Register(IAppHost appHost)
Parameters​
TypeName
ServiceStack.IAppHostappHost

Implements​