Browse all docs

Browser, device and time conditions

New rule conditions: browser, browser version, device type and request time window. Allow by user agent, route by device, or apply a rule only at set hours.

What it does

WAF rule conditions gain four field types: browser, browser version, device type and request time. The first three come from parsing the request's User-Agent; time is judged on the node's current time.

When to use it

  • Allow visits from the WeChat in-app browser or certain mobile browsers.
  • Require that browsers reaching an admin area are at least a given version.
  • Apply a rule only to phones or tablets and leave desktop traffic alone.
  • Open a path only on weekdays during the day and block it otherwise, or enable a rule only during a campaign.

Where to configure it

The security policy rule editor, in the condition field groups "Client and device" and "Time". The User-Agent is declared by the client, so these conditions suit routing and filtering and must not be used as authentication.

Settings

Browser

Field "Browser", operator "is one of" or "is not one of", multiple choice.

NameDescription
wechat_browserWeChat in-app browser
qq_browserQQ Browser
uc_browserUC Browser
baidu_browserBaidu Browser
sogou_browserSogou Browser
360_browser360 Browser, no version available
microsoft_edgeEdge
operaOpera
samsung_browserSamsung Internet
firefoxFirefox
google_chromeChrome
safariSafari
unknownNone of the above

Browser version

Field "Browser version": choose a browser, then an operator (equals, at least, less than) and enter a version.

Device type

Field "Device type", multiple choice: desktop, mobile, tablet, and bot for clients that claim to be a crawler or script client or send no User-Agent.

Request time

Field "Request time", operator "within" or "not within" the time range. The time zone is an IANA name, default Asia/Shanghai; the UI offers common zones and accepts others. Two forms; use one per condition:

FormContentExampleLimit
WeeklyDays plus start and end timemon,tue,wed,thu,fri 09:00-18:007 items
RangeStart and end in local time2026-11-11T00:00:00 / 2026-11-12T00:00:004 items

In the weekly form a start later than the end spans midnight and belongs to the start day: fri 22:00-02:00 is Friday 22:00 to Saturday 02:00. The end time itself is excluded. Equal start and end are rejected.

FAQ

How do I know what a User-Agent will be recognized as

Next to the browser and device conditions in the rule editor there is "Try it". Paste a User-Agent to see the detected browser, version and device type.

The version condition does nothing for 360 Browser

Its User-Agent is almost identical to Chrome's and carries no version, so there is nothing to compare.

Whose clock does the time condition use

The node's own time, converted to the time zone you selected.

Can these conditions be used in CC or ACL rules

They apply to WAF rules only.