STRING, can be read and
set, but not
Log data generated by the last WAF rule to be matched by the request, Base64 encoded.
This string provides contextual information related to the current request, usually the text which matched the pattern established by the rule.
waf_debug_log subroutine, this variable reflects the individual log data generated by the preceding rule that was processed. Each time a rule is matched by the WAF, the log data variable will be set, and the
waf_debug_log subroutine will be invoked, providing an opportunity to log the context for each matched rule.
waf.logdata is used in the following code examples. Examples apply VCL to real-world use cases and can be deployed as they are, or adapted for your own service. See the full list of code examples for more inspiration.
Click RUN on a sample below to provision a Fastly service, execute the code on Fastly, and see how the function behaves.
Add custom WAF rules
The web application firewall has thousands of rules built in, but you can augment these with your own.