Skip to content

Commit 2893ada

Browse files
maxvpelithrar
authored andcommitted
[Gateway] Update selector API names (#17934)
1 parent d1dada6 commit 2893ada

File tree

5 files changed

+25
-26
lines changed

5 files changed

+25
-26
lines changed

src/content/docs/cloudflare-one/policies/gateway/egress-policies/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ The country of the user making the request. <Render file="gateway/selectors/sour
9494

9595
<Render
9696
file="gateway/selectors/source-internal-ip"
97-
params={{ one: "egress", two: "net" }}
97+
params={{ one: "egress", two: "net.src.internal_src_ip" }}
9898
/>
9999

100100
### Source IP

src/content/docs/cloudflare-one/policies/gateway/http-policies/index.mdx

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -407,9 +407,9 @@ When using Terraform to create a policy with the [Do Not Inspect](#do-not-inspec
407407

408408
### Content Categories
409409

410-
| UI name | API example |
411-
| ------------------ | ------------------------------------------------------- |
412-
| Content Categories | `not(any(http.request.uri.content_category[*] in {1}))` |
410+
| UI name | API example |
411+
| ------------------ | ------------------------------------------------ |
412+
| Content Categories | `not(any(http.conn.content_category[*] in {1}))` |
413413

414414
For more information, refer to our list of [content categories](/cloudflare-one/policies/gateway/domain-categories/#content-categories).
415415

@@ -441,9 +441,9 @@ Only applies to traffic sent through the [WARP client](/cloudflare-one/connectio
441441
Only applies to traffic sent through the [WARP client](/cloudflare-one/connections/connect-devices/warp/set-up-warp/#gateway-with-warp-default).
442442
:::
443443

444-
| UI name | API example |
445-
| -------------- | ----------------------------- |
446-
| Destination IP | `http.dst.ip == "10.0.0.0/8"` |
444+
| UI name | API example |
445+
| -------------- | ---------------------------------- |
446+
| Destination IP | `http.conn.dst_ip == "10.0.0.0/8"` |
447447

448448
### Device Posture
449449

@@ -453,9 +453,9 @@ Only applies to traffic sent through the [WARP client](/cloudflare-one/connectio
453453

454454
Use this selector to match against a domain and all subdomains -- for example, if you want to block `example.com` and subdomains such as `www.example.com`.
455455

456-
| UI name | API example |
457-
| ------- | ----------------------------------------------- |
458-
| Domain | `any(http.request.domains[*] == "example.com")` |
456+
| UI name | API example |
457+
| ------- | -------------------------------------------- |
458+
| Domain | `any(http.conn.domains[*] == "example.com")` |
459459

460460
### Download and Upload File Types
461461

@@ -540,9 +540,9 @@ Scans HTTP traffic for the presence of social security numbers and other PII. Yo
540540

541541
Use this selector to match only the hostname specified -- for example, if you want to block `test.example.com` but not `example.com` or `www.test.example.com`.
542542

543-
| UI name | API example |
544-
| ------- | ----------------------------------------- |
545-
| Host | `http.request.host == "test.example.com"` |
543+
| UI name | API example |
544+
| ------- | ------------------------------------------ |
545+
| Host | `http.conn.hostname == "test.example.com"` |
546546

547547
:::note
548548
Some hostnames (`example.com`) will invisibly redirect to the www subdomain (`www.example.com`). To match this type of website, use the [Domain](#domain) selector instead of the Host selector.
@@ -566,9 +566,9 @@ Some hostnames (`example.com`) will invisibly redirect to the www subdomain (`ww
566566

567567
### Security Risks
568568

569-
| UI name | API example |
570-
| -------------- | ------------------------------------------ |
571-
| Security Risks | `any(http.request.uri.category[*] in {1})` |
569+
| UI name | API example |
570+
| -------------- | -------------------------------------------- |
571+
| Security Risks | `any(http.conn.security_category[*] in {1})` |
572572

573573
For more information, refer to our list of [security categories](/cloudflare-one/policies/gateway/domain-categories/#security-categories).
574574

@@ -584,14 +584,14 @@ The country of the user making the request. <Render file="gateway/selectors/sour
584584

585585
<Render
586586
file="gateway/selectors/source-internal-ip"
587-
params={{ one: "HTTP", two: "http" }}
587+
params={{ one: "HTTP", two: "http.conn.internal_src_ip" }}
588588
/>
589589

590590
### Source IP
591591

592-
| UI name | API example |
593-
| --------- | ----------------------------- |
594-
| Source IP | `http.src.ip == "10.0.0.0/8"` |
592+
| UI name | API example |
593+
| --------- | ---------------------------------- |
594+
| Source IP | `http.conn.src_ip == "10.0.0.0/8"` |
595595

596596
### URL
597597

src/content/docs/cloudflare-one/policies/gateway/network-policies/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ The country of the user making the request. <Render file="gateway/selectors/sour
292292

293293
<Render
294294
file="gateway/selectors/source-internal-ip"
295-
params={{ one: "network", two: "net" }}
295+
params={{ one: "network", two: "net.src.internal_src_ip" }}
296296
/>
297297

298298
### Source IP

src/content/partials/cloudflare-one/gateway/selectors/destination-ip.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
---
22
{}
3-
43
---
54

6-
The IP address of the requests target.
5+
The IP address of the request's target.
76

87
| UI name | API example |
98
| -------------- | ---------------------------- |

src/content/partials/cloudflare-one/gateway/selectors/source-internal-ip.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ import { Markdown } from "~/components";
66

77
Use this selector to apply {props.one} policies to a private IP address, assigned by a user's local network, that requests arrive to Gateway from. This selector will only apply to users connected through a [Magic GRE or IPSec tunnel](/magic-wan/zero-trust/cloudflare-gateway/).
88

9-
| UI name | API example |
10-
| ------------------ | ----------------------------------------------------------------- |
11-
| Source Internal IP | <code>{props.two}.src.internal_src_ip == "192.168.86.0/27"</code> |
9+
| UI name | API example |
10+
| ------------------ | --------------------------------------------- |
11+
| Source Internal IP | <code>{props.two} == "192.168.86.0/27"</code> |

0 commit comments

Comments
 (0)