# Intercepting Request and Response Payloads

Filters are key to securing your data using the VGS Platform. Filters are the logic that dictates which data is segmented to our secure vault and what passes through directly to your systems or third-party systems. In this tutorial, we'll discuss a bit about filters. Filters go hand in hand with [Operations](https://docs.verygoodsecurity.com/vault/http-proxy/operations)

**How to configure filters**

Use [`Routes` menu on the Dashboard](https://dashboard.verygoodsecurity.com/dashboard/v/VLTor87V5Gu72PrMQEKw7aLZF/routes). VGS routes have an extensive set of features, including a wide range of applicable filters, IP allowlisting, and custom hostnames.

A Filter has three parts: an 'Attribute', an 'Operator' (in, not in, matches, equals, etc.), and a final 'Variable' field that ties it all together.

### Attributes

The image below shows the expanded Filter Attributes drop-down. Beneath that is a brief definition.&#x20;

<figure><img src="https://2096104711-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUreALQAfVnRMQEz110rC%2Fuploads%2FfkUJzReTXJCnB9urVZ1t%2Fimage.png?alt=media&#x26;token=a92519d1-ac1d-4d50-a309-8d786f3eb146" alt=""><figcaption></figcaption></figure>

* `HTTP Method`: GET, POST, PATCH, PUT, DELETE, HEAD, CONNECT, OPTIONS, TRACE (this is the only attribute with set variables)
* `PathInfo`: The path where your filter will fire. /payments, depending on the operator, this can be beginsWith, or matches (using Regex), or equals, among other options
* `ContentType` : Header Information ex. application/json
* `Status`: ex: 200, 301

### Operators

The operators are expanded below. With brief descriptions under that.&#x20;

<figure><img src="https://2096104711-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUreALQAfVnRMQEz110rC%2Fuploads%2FjTQKhBZRudgzjA74Gl5b%2FScreenshot%202025-08-28%20at%202.05.14%E2%80%AFPM.png?alt=media&#x26;token=2af5f874-5f13-4d71-925b-d1ef692b3acc" alt=""><figcaption></figcaption></figure>

* `equals`: exact match case sensitive
* `does not equal`: is not an exact match, case sensitive
* `in`: contains the variable
* `not in`: does not contain the variable
* `begins with`: the path, content-type, et,c begins with the variable
* `does not begin with`: exclusionary operator
* `matches`: REGEX pattern matching option
* `ends with`: Whatever the attribute ends with should match your variable
* `does not end with`: exclusionary ends with
* `is empty`: does not require a variable - just tells if the attribute is empty
* `is not empty`: does not require a variable - just tells if the attribute has a value
* `equals (media type)`: matches the media type according to [RFC7231](https://tools.ietf.org/html/rfc7231#section-3.1.1.1) (applicable to `Content-Type` header only)

### Variables

The final field in the Filter condition, blank on everything but HTTP Methods. You should fill this field out.&#x20;

<figure><img src="https://2096104711-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUreALQAfVnRMQEz110rC%2Fuploads%2FwZ9e7dJkwMXVIC3XEpgR%2FScreenshot%202025-08-28%20at%202.06.01%E2%80%AFPM.png?alt=media&#x26;token=f8192a65-db29-4561-813e-aeb0565c3cd9" alt=""><figcaption></figcaption></figure>

* Aside from HTTP Methods, this field is for you to enter information and build filter conditions.

### Common Filter Examples

* `'HTTP Method' 'equals' 'POST'`
* `Status Code' 'equals' '200'`
* `'ContentType' 'equals' 'text/xml'`
* `'PathInfo' 'begins with' '/cards'`
* `'ContentType' 'begins with' 'text/html;'`

### Why Filters are Important

The filters are the logic that tells the platform to segment your data on the fly to the vault and replace it with alias values, or let the payload pass through untouched.

If you need help, have questions, or comments regarding this page, contact us at <support@vgs.io>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.verygoodsecurity.com/vault/http-proxy/filters.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
