chore: refactroing of code
Commenting code for enhancing readability
This commit is contained in:
@@ -23,6 +23,7 @@ import (
|
||||
"slices"
|
||||
)
|
||||
|
||||
// getRealIP returns user real IP
|
||||
func getRealIP(r *http.Request) string {
|
||||
if ip := r.Header.Get("X-Real-IP"); ip != "" {
|
||||
return ip
|
||||
|
||||
@@ -24,6 +24,7 @@ import (
|
||||
"github.com/redis/go-redis/v9"
|
||||
)
|
||||
|
||||
// redisRateLimiter, handle rateLimit
|
||||
func redisRateLimiter(clientIP string, rate int) error {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user