How to use WAF positional constraint STARTS_WITH in a URI web request

0

I created a rule Type --> Regular, Field to match --> URI path, Positional constraint --> STARTS_WITH, Search string --> "/test" Action --> allow

I'm trying to test the functionality of the rule as : "curl http://test/apache-server-testing-loadbalancer-123456789.af-south-1.elb.amazonaws.com" but it's saying "Could not resolve host: test". please how can i have "/test" at the start of the URL for the functionality test.

below is the actual URI of the resource ----"curl http://apache-server-testing-loadbalancer-123456789.af-south-1.elb.amazonaws.com"

bibi143
gefragt vor einem Jahr486 Aufrufe
1 Antwort
0

If you created a rule as you mentioned, you should try like below.

"curl http://apache-server-testing-loadbalancer-123456789.af-south-1.elb.amazonaws.com/test"

apache-server-testing-loadbalancer-123456789.af-south-1.elb.amazonaws.com is host field and "/test" is part of URI.

Thanks

profile pictureAWS
beantwortet vor einem Jahr
  • Hi @ Eunsu_Shin, I thought having "/test" at the end represent "positional_constraint - ENDS_WITH. Isn't there a difference between STARTS_WITH and ENDS_WITH? Thanks

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