teler-waf is a Go HTTP middleware that protects local web services from OWASP Top 10 threats, known vulnerabilities, malicious actors, botnets, unwanted crawlers, and brute force attacks.
The current issue pertains to the process of benchmarking and initializing the *Teler instance within the codebase. The proposed solution suggests that benchmarking should be conducted by directly invoking the corresponding threat check functions (e.g., checkCommonWebAttack, checkCVE, checkDirectoryBruteforce, etc.), instead of employing the http.Client{}.Do method approach, which incorporates the use of httptest.NewServer function.
Motivation
Documenting this change in the benchmarking process is essential to clarify how benchmarking should be performed and to ensure that the process is consistent and well understood-by all contributors. This documentation will benefit both existing and future developers who work on the codebase. It will provide clear instructions on how to conduct benchmarking, leading to better code quality and more streamlined development processes.
Summary
The current issue pertains to the process of benchmarking and initializing the
*Teler
instance within the codebase. The proposed solution suggests that benchmarking should be conducted by directly invoking the corresponding threat check functions (e.g., checkCommonWebAttack, checkCVE, checkDirectoryBruteforce, etc.), instead of employing thehttp.Client{}.Do
method approach, which incorporates the use ofhttptest.NewServer
function.Motivation
Documenting this change in the benchmarking process is essential to clarify how benchmarking should be performed and to ensure that the process is consistent and well understood-by all contributors. This documentation will benefit both existing and future developers who work on the codebase. It will provide clear instructions on how to conduct benchmarking, leading to better code quality and more streamlined development processes.