Skip to main content

ExtensionReferenceFilter

Filter by file extension (if present on last segment).

Notes

Filters references by the file extension found in the last path segment of the URL or file path. Accepts or rejects references based on whether their extension matches the configured list.

Examples

The following example will only accept references with the following extensions, regardless of character case: .html, .htm, .php, and .asp.

class: ExtensionReferenceFilter
extensions:
- html
- htm
- php
- asp
ignoreCase: true

Usage

Full configuration skeleton, with every option and its default
class: ExtensionReferenceFilter
extensions:
- string
ignoreCase: false
onMatch: INCLUDE

Properties

PropertyTypeRequiredDefault
extensionsstring[]No-
ignoreCasebooleanNofalse
onMatchenumNoINCLUDE

Property Details

extensions

One or more file extension (e.g., html, pdf, ...).

ignoreCase

When enabled, matching is performed without regard to character case.

onMatch

What to do with a reference once its file extension is matched.

Allowed Values

  • INCLUDE
  • EXCLUDE