teler-sh / teler-waf

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.
https://test.teler.sh
Apache License 2.0
354 stars 32 forks source link

refactor: HTTP CVE requests handling in `processResource()` #72

Closed dwisiswant0 closed 1 year ago

dwisiswant0 commented 1 year ago

IMPORTANT: Please do not create a PR without creating an issue first!

(Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of the pull request).

Summary

This commit refactors the (*Teler).processResource method to improve the handling of HTTP requests in the template. The changes involve updating the loop to iterate over the http array instead of requests and adjusting the variable names accordingly. This will enhance the clarity and maintainability of the codebase.

Proposed of changes

This PR fixes/implements the following bugs/features:

How has this been tested?

Proof:

Closing issues

Fixes #

Checklist:

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 50.00% and no project coverage change.

Comparison is base (082e826) 74.37% compared to head (5b0d57b) 74.37%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #72 +/- ## ======================================= Coverage 74.37% 74.37% ======================================= Files 5 5 Lines 999 999 ======================================= Hits 743 743 Misses 208 208 Partials 48 48 ``` | [Files Changed](https://app.codecov.io/gh/kitabisa/teler-waf/pull/72?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kitabisa) | Coverage Δ | | |---|---|---| | [teler.go](https://app.codecov.io/gh/kitabisa/teler-waf/pull/72?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kitabisa#diff-dGVsZXIuZ28=) | `72.02% <50.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.