Skip to main content
AACastillo
Staff
Staff
Oct 17, 2026 11:15 AM UTC

Header value character limit stuck at 255 in FortiWeb custom rules

Description

A fix for a FortiWeb graphical user interface issue that limits the Header Value field to 255 characters in custom rules.

Scope

FortiWeb versions 7.6.x and 8.0.x.

Solution

When configuring a custom access rule in the FortiWeb graphical user interface, the Header Value field shows the error message "Please enter no more than 255 characters". This limitation prevents the use of long Regular Expressions (RegEx) for fields such as User-Agent, parameter, or user.

66227a91.png


This issue is only happens with the FortiWeb's graphical user interface (GUI), no matter which browser is used, while the command line interface (CLI) allows up to 1023 characters.

To solve this, use the CLI to configure the custom rule, as the CLI supports a character limit of up to 1023 characters for the header-value field.

Access to the FortiWeb CLI and run the following commands to configure the custom access rule with the desired long header value:

config waf custom-access rule
   edit "CustomRule_Name"
      config http-header-filter
      edit 1
         set predefined-header user-agent


Write all of the required names in text form:

         set header-value "(RegEx_Pattern_Here)|(RegEx_Pattern_02)|(Another_Pattern)|(Bot_name_here)|.....|(finalbot)" 


Conclude the configuration as normal:

         next
      end
   next
end


Verify the configuration to ensure the long expression is applied correctly.

    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