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
asked a year ago477 views
1 Answer
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
answered a year ago
  • 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

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions