Skip to content

Commit c2b6470

Browse files
committed
botstopper: fix layered navigation example
The normalized path that path_regex uses, has query params stripped. Instead, there's a map variable called `query` which we can use here.
1 parent f9942c0 commit c2b6470

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

docs/hypernode-platform/botstopper/how-to-use-botstopper.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,10 @@ Add suspicion weight for bots crawling layered navigation URLs:
198198
```yaml
199199
- name: weigh-layered-navigation-bots
200200
action: WEIGH
201-
path_regex: ^/.*(color|size|brand)=.*
202-
user_agent_regex: (?i:bot|crawler|spider)
201+
expression:
202+
all:
203+
- userAgent.matches("(?i:bot|crawler|spider)")
204+
- '"color" in query || "size" in query || "brand" in query'
203205
weight:
204206
adjust: 20
205207
```

0 commit comments

Comments
 (0)