New Transparent capture is in preview. Record every app's traffic with no proxy configuration, on Windows, macOS and Linux. Learn more

fontFilter Filter

Select exchanges whose response carries a web font payload, useful for cache audits, header rewrites and typography debugging in a session.

fontFilter is a small, focused filter that pairs well with cache and CORS related actions. It is most useful in frontend debugging sessions where typography needs to be examined alongside layout and script loading.

When to use this filter

Use fontFilter to scope rules to responses that carry web font content, typically font/woff2, font/woff, application/font-woff, application/x-font-ttf and similar MIME types. Fonts often come from a CDN, are heavily cached, and can be a frequent source of CORS misconfiguration, all of which makes them worth filtering as a group.

Typical situations:

  • Inspecting which font files a page actually downloads to spot redundant variants.
  • Forcing fresh fetches by removing cache headers while iterating on a typography change.
  • Adding a permissive CORS header to fonts served from a private CDN during integration testing.

The filter fires on the responseHeaderReceivedFromRemote scope. Combine it with hostFilter if you want to restrict it to a specific font provider such as a self hosted CDN.

Real world examples

Strip cache headers from fonts during a typography iteration

Force the browser to refetch fonts on every reload while you tune a custom font face configuration.

rules:
- filter:
    typeKind: FontFilter
  actions:
  - typeKind: RemoveCacheAction

Add a CORS header to fonts served from a private CDN

Allow the application origin to consume fonts from a private CDN during integration testing without changing the CDN configuration.

rules:
- filter:
    typeKind: FilterCollection
    operation: and
    children:
    - typeKind: HostFilter
      pattern: cdn.example.com
      operation: Exact
    - typeKind: FontFilter
  actions:
  - typeKind: AddResponseHeaderAction
    headerName: Access-Control-Allow-Origin
    headerValue: https://app.example.com

Tag fonts for an asset audit

Tag every font response in the capture so you can later count, group and review them in a static asset audit.

rules:
- filter:
    typeKind: FontFilter
  actions:
  - typeKind: ApplyTagAction
    tag:
      value: font-asset

Reference

fontFilter

Description

Select exchanges having response content type matching a font payload.

Evaluation scope

Evaluation scope defines the timing where this filter will be applied.

responseHeaderReceivedFromRemote This scope occurs the moment fluxzy has done parsing the response header.

YAML configuration name

fontFilter

Settings

This filter has no specific characteristic

The following table describes the customizable properties available for this filter:

Property Type Description DefaultValue
inverted boolean Negate the filter result false

Example of usage

The following examples apply a comment to the filtered exchange

Select exchanges having response content type matching a font payload.

rules:
- filter:
    typeKind: FontFilter
  actions:
  - typeKind: ApplyCommentAction
    comment: filter was applied

.NET reference

View definition of FontFilter for .NET integration.

See also

The following filters are related to this filter:

Frequently asked questions

Which MIME types does fontFilter match?

The standard font media types such as font/woff2, font/woff, font/ttf, application/font-woff and application/x-font-ttf. Generic or incorrect MIME types may not match.

Can I distinguish woff2 from woff?

Not with fontFilter alone, it groups all font media types. Use a requestHeaderFilter or pathFilter to match a specific extension.

Does it work on requests too?

No. fontFilter looks at the response Content-Type header. Font requests typically carry no Content-Type because the body is empty.

How does it interact with image and css filters?

They cover different MIME families. Combine them inside a filterCollection with operation: or to select any static asset of a page.

Learn more about Fluxzy rules