# 4.5 Block POST Values

#### 📘 Overview

The **Block POST Values** module allows you to block incoming HTTP POST requests based on specific field names and values in the request body.\
This helps stop malicious or unwanted content **before it reaches your backend**.

***

#### 🛠️ How It Works

You define two things:

* **POST Key**: The name of the POST parameter you want to inspect\
  (e.g., `message`, `username`, `comment`, `bio`)
* **POST Content**: The exact value to block within that field

If a match is found, the request is immediately **blocked** at the edge.

***

#### ⚙️ How to Add a Block Rule

1. Go to **Security Rules > Block POST Values**
2. Click **Add New Rule**
3. Enter:
   * `Enter Post Key`: the POST parameter to monitor
   * `Enter Post Content`: the value that should trigger blocking
4. Click **Block**
5. The rule is enforced instantly

<figure><img src="/files/qQU22bXEN24lE2psmfYx" alt=""><figcaption></figcaption></figure>

***

#### 📋 Example Use Case

* Block POSTs where the field `comment` contains the value `buy now`
* Block `username` field if it contains `admin` (to prevent impersonation)

***

#### 🔐 Why This Matters

Blocking harmful content at the POST layer helps prevent:

* Spam submissions in contact forms or comments
* Basic SQL injection or XSS payloads
* Unwanted automated POSTs or abuse attempts

This feature acts as a **first line of defense**.

***

🎯 **POST Value Blocking is a fast and simple way to filter out known bad inputs before they can do harm.**


---

# 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.shieldsguard.com/getting-started/4.-security-rules/4.5-block-post-values.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.
