Class HttpAccessControlHandler
Handles access control HTTP requests.
Implements
Inherited Members
Namespace: Solti.Utils.Rpc.Pipeline
Assembly: Solti.Utils.Rpc.Server.dll
Syntax
public class HttpAccessControlHandler : RequestHandlerBase<IHttpAccessControlHandlerConfig>, IRequestHandler
Constructors
HttpAccessControlHandler(IRequestHandler, IHttpAccessControlHandlerConfig)
Creates a new HttpAccessControlHandler instance.
Declaration
public HttpAccessControlHandler(IRequestHandler next, IHttpAccessControlHandlerConfig config)
Parameters
Type | Name | Description |
---|---|---|
IRequestHandler | next | |
IHttpAccessControlHandlerConfig | config |
Remarks
This handler requires a next
value to be supplied.
Methods
HandleAsync(IInjector, IHttpSession, CancellationToken)
Does some handler specific work.
Declaration
public override Task HandleAsync(IInjector scope, IHttpSession context, CancellationToken cancellation)
Parameters
Type | Name | Description |
---|---|---|
Solti.Utils.DI.Interfaces.IInjector | scope | |
IHttpSession | context | |
CancellationToken | cancellation |
Returns
Type | Description |
---|---|
Task |
Overrides
Solti.Utils.Rpc.Pipeline.RequestHandlerBase<Solti.Utils.Rpc.Pipeline.IHttpAccessControlHandlerConfig>.HandleAsync(Solti.Utils.DI.Interfaces.IInjector, Solti.Utils.Rpc.Interfaces.IHttpSession, System.Threading.CancellationToken)
IsPreflight(IHttpSession)
Determines whether the request is a preflight request or not.
Declaration
protected static bool IsPreflight(IHttpSession context)
Parameters
Type | Name | Description |
---|---|---|
IHttpSession | context |
Returns
Type | Description |
---|---|
Boolean |
SetAcHeaders(IHttpSession)
Sets the "Access-Control-XxX" headers.
Declaration
protected virtual void SetAcHeaders(IHttpSession context)
Parameters
Type | Name | Description |
---|---|---|
IHttpSession | context |