Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadAndValidateSeclangDirectives ¶
func LoadAndValidateSeclangDirectives(directives []types.SeclangDirective) (coraza.WAF, error)
LoadAndValidateSeclangDirectives takes a slice of parsed SeclangDirective from the crslang/types package, converts them back to a valid SecLang string (using the built-in ToSeclang() method), loads them into a fresh Coraza WAF instance with the embedded CRS phrase-list root FS, and returns the WAF + any error.
If the returned error is nil → the rules are syntactically valid and were successfully compiled by Coraza's SecLang parser.
func LoadAndValidateSeclangDirectivesWithFS ¶
func LoadAndValidateSeclangDirectivesWithFS(directives []types.SeclangDirective, root fs.FS) (coraza.WAF, error)
LoadAndValidateSeclangDirectivesWithFS loads directives with an optional root FS so @pmFromFile basenames resolve via fs.Open(basename) / relative paths. When root is nil, Coraza uses the default (host) filesystem.
Types ¶
This section is empty.