Block suspicious(specific) user-agent using AWS WAF

0

I want to block all requests with suspicious user-agent to access APIGW. For example, how can I make rule to block all requests with user-agent as

 "python-requests/2.27.1" 

or other version of python-requests

1 Antwort
0
Akzeptierte Antwort

The simplest way to do this is to create a string match condition and then check the User-Agent header against that condition.

profile pictureAWS
EXPERTE
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen