Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -446,11 +446,10 @@ Only applies to traffic sent through the [WARP client](/cloudflare-one/connectio

### Domain

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`.

| UI name | API example |
| ------- | -------------------------------------------- |
| Domain | `any(http.conn.domains[*] == "example.com")` |
<Render
file="gateway/selectors/domain"
params={{ APIendpoint: "http.conn.domains" }}
/>

### Download and Upload File Size

Expand Down Expand Up @@ -549,15 +548,10 @@ Scans HTTP traffic for the presence of social security numbers and other PII. Yo

### Host

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`.

| UI name | API example |
| ------- | ------------------------------------------ |
| Host | `http.conn.hostname == "test.example.com"` |

:::note
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.
:::
<Render
file="gateway/selectors/host"
params={{ APIendpoint: "http.conn.hostname" }}
/>

### HTTP Method

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,13 @@ Your lists can include up to 1,000 entries for Standard plans and 5,000 for Ente

Hostname lists do not support wildcard entries. You will need to add domains as exact matches. Adding a wildcard to lists comprised of hostnames will return an error when you save.

### Non-Latin characters

Gateway supports non-Latin characters by converting all domains and hostnames to [Punycode](https://www.rfc-editor.org/rfc/rfc3492.txt). Once you save a list with non-Latin characters, Gateway will display the entry as Punycode.

### Duplicate entries

Lists cannot have duplicate entries. Because hostnames are converted to [Punycode](https://www.rfc-editor.org/rfc/rfc3492.txt), multiple list entries that convert to the same string will count as duplicates. For example, `éxàmple.com` converts to `xn—xmple-rqa5d.com`, so including both `éxàmple.com` and `xn—xmple-rqa5d.com` in a list will result in a duplicate error.
Lists cannot have duplicate entries. Because domains and hostnames are converted to [Punycode](#non-latin-characters), multiple list entries that convert to the same string will count as duplicates. For example, `éxàmple.com` converts to `xn—xmple-rqa5d.com`, so including both `éxàmple.com` and `xn—xmple-rqa5d.com` in a list will result in a duplicate error.

### URL slashes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@ params:
- APIendpoint
---

import { Render } from "~/components";

Use this selector to match against a domain and all subdomains. For example, you can match `example.com` and its subdomains, such as `www.example.com`.

| UI name | API example | Evaluation phase |
| ------- | ------------------------------------------------- | --------------------- |
| Domain | <code>any({props.APIendpoint}[*] in \{1\})</code> | Before DNS resolution |
| UI name | API example | Evaluation phase |
| ------- | --------------------------------------------------------- | --------------------- |
| Domain | <code>any({props.APIendpoint}[*] == "example.com")</code> | Before DNS resolution |

<Render
file="gateway/selectors/non-latin-characters"
params={{ inputType: "domain" }}
/>
11 changes: 11 additions & 0 deletions src/content/partials/cloudflare-one/gateway/selectors/host.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,19 @@ params:
- APIendpoint
---

import { Render } from "~/components";

Use this selector to match against only the hostname specified. For example, you can match `test.example.com` but not `example.com` or `www.test.example.com`.

| UI name | API example | Evaluation phase |
| ------- | --------------------------------------------------- | --------------------- |
| Host | <code>{props.APIendpoint} == \"example.com\"</code> | Before DNS resolution |

<Render
file="gateway/selectors/non-latin-characters"
params={{ inputType: "hostname" }}
/>

:::note
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.
:::
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
params:
- inputType
---

Gateway policies do not support {props.inputType}s with non-Latin characters directly. To use a {props.inputType} with non-Latin characters, add it to a [list](/cloudflare-one/policies/gateway/lists/).
Loading