Skip to main content

How rules work

Rules let you attach ordered, conditional behavior to a CDN property. The Paradarum edge (OpenResty) evaluates each rule against incoming requests and applies the matching ones to the request or response.

The two shipped rule typesโ€‹

Today the rules engine ships exactly two rule types:

Rule typeRuleType valueWhat it does
Cache rule0Controls cache TTL and per-URL cache features for matching URLs. See Cache rules.
Header rule1Adds, sets, or deletes an HTTP header on the request or response. See Header rules.

Both rule types share the same matching mechanism โ€” a single URL match operator โ€” and the same lifecycle controls described below.

Redirect, reverse-proxy, and static-response rules are not available

Some scaffolding exists internally (and in the frontend) for redirect, reverse-proxy, static-response, and rewrite rule types. None of these are wired into the product and they cannot be created or edited. Treat them as roadmap only โ€” do not rely on them. The only usable rule types are Cache rule and Header rule.

Where rules liveโ€‹

Rules attach to a single property. In the Paradarum panel, open Properties โ†’ (select a property) โ†’ Detail โ†’ Rules. The Rules tab gives you a list view, a create flow, and an edit flow per rule.

When you create a rule, a Select Rule Type dialog offers two cards โ€” Cache Rule and Header Rule โ€” and your choice determines which configuration form you see.

Orderingโ€‹

Every rule carries an integer order. Lower order runs first. This lets you control precedence โ€” for example, applying a broad cache rule before a more specific override, or stripping a header before another rule adds it.

In the panel you reorder rules by drag-and-drop. Each drag persists the changed rows and shows a confirmation snackbar.

Reordering saves each rule separately

Each rule's new position is saved individually, so a partial failure is possible โ€” if it happens, the panel shows a "Some rule order updates failed" message and you can simply drag again.

Enable and disableโ€‹

Each rule has an isEnabled toggle. Disabling a rule stops it from being applied without deleting it, so you can keep a rule's configuration around and switch it back on later.

System rulesโ€‹

Rules also carry an IsSystem flag. System rules are managed by the platform โ€” for example, the rules that back a live-stream property โ€” and are:

  • read-only โ€” you cannot edit or delete them from the panel, and
  • hidden by default โ€” they are filtered out of the list unless you explicitly include them.

For managed properties (such as one backing a live stream), the panel shows system rules read-only with a one-line summary, for example cache 3600s ยท /hls/ or response header ยท Access-Control-Allow-Origin: *.

How changes reach the edgeโ€‹

Changes are near-real-time, not instant. The edge polls configuration rather than receiving a synchronous push โ€” creating, editing, deleting, or reordering a rule updates the stored configuration, and the OpenResty edge picks it up on its next poll.

note

Because propagation is poll-based, allow a short delay after saving before validating behavior at the edge.

Next stepsโ€‹