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
已提問 1 年前檢視次數 486 次
1 個回答
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
已回答 1 年前
  • 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

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南