Skip to main content
Khidzir_MN
Staff
Staff
March 2, 2026

Technical Tip: How to block HTTP request with empty value for specific HTTP header

Description This article describes how to block HTTP requests with an empty value for a specific HTTP Header.
Scope FortiAppSec Cloud WAF.
Solution

There is a requirement to block HTTP requests with an empty value for a specific HTTP Header

 

For this article example, the requirement is to block HTTP requests with an empty value for the User-Agent HTTP Header.


Step 1: Go to WAF -> Applications (select the respective Applications) -> Advanced Applications -> Custom Rule.
Step 2: Create a new Custom Rule as below:

 

custom_rule.png

 

filter_empty_header.png


Step 3: Review the respective Attack Logs (Threat Analytics -> Attack Logs). The User-Agents HTTP Header shown in the Data Packet Details has no value (empty), and the request was blocked.

 

alog.png

 

packet.png

 

Related documents:
Custom Rule

Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
Security Operations Summit: Modernize SecOps. Operate AI-Native.AMER: November 4 | 9:00 AM PST. India and SAARC: November 5 | 10:00 AM IST. EMEA: November 5 | 10:30 AM CET. APAC: November 5 | 11:00 AM SGT