Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ResourceMatch.cs
1using System.Threading.Tasks;
2using System.Xml;
4
6{
11 {
16 : base()
17 {
18 }
19
27 : base(Xml, Parent, Document)
28 {
29 }
30
34 public override string LocalName => nameof(ResourceMatch);
35
43 public override WafAction Create(XmlElement Xml, WafAction Parent, WebApplicationFirewall Document) => new ResourceMatch(Xml, Parent, Document);
44
50 public override Task<WafResult?> Review(ProcessingState State)
51 {
52 string Resource = State.Request.Resource?.ResourceName;
53 if (Resource is null)
54 return Task.FromResult<WafResult?>(null);
55 else
56 return this.Review(State, Resource);
57 }
58 }
59}
Checks for a match against the Resource of the request.
override WafAction Create(XmlElement Xml, WafAction Parent, WebApplicationFirewall Document)
Creates a WAF action from its XML definition.
ResourceMatch()
Checks for a match against the Resource of the request.
override string LocalName
XML Local Name for the XML element defining the action.
ResourceMatch(XmlElement Xml, WafAction Parent, WebApplicationFirewall Document)
Checks for a match against the Resource of the request.
override Task< WafResult?> Review(ProcessingState State)
Reviews the processing state, and returns a WAF result, if any.
Abstract base class for Web Application Firewall conditions.
Definition: WafCondition.cs:21
Contains the current state of a review process.
HttpRequest Request
Current HTTP Request
Abstract base class for Web Application Firewall actions.
Definition: WafAction.cs:17
WebApplicationFirewall Document
Web Application Firewall document.
Definition: WafAction.cs:60
Web Application Firewall for HttpServer.
WafResult
Actions that a Web Server can take after reviewing a request.