[snippet-filter:<uri>] stanza

Use the [snippet-filter:<uri>] stanza to configure the snippet filter for a particular resource.

[snippet-filter:<uri>]
<location> = <filename>

Description

This filter allows snippets to be inserted into the response for the specified URI. The filter examines each individual line of the response, and if the entire line matches, the filter inserts the snippet prior to the matching line.

Options

Usage:

We can specify multiple resources and configure multiple locations for each resource. The entries in the stanza must appear in the order in which they will be inserted in the returned page. Only the first match for each configuration entry is updated with the snippet. After a match has been found, WebSEAL progresses to the next configuration entry. If a match is not found for a particular configuration entry, the subsequent entries in the stanza are not processed.

We must include a new line character at the end of the snippet file contents if we want the snippet to be inserted as a separate line. Otherwise, WebSEAL adds the snippet to the start of the matching line.

When we configure a snippet-filter stanza for a resource that is accessed over a virtual junction or a local junction, the <uri> value is a forward slash followed by the resource name. For example, [snippet-filter:/myResource.html].

As a result, a particular [snippet-filter:<uri>] stanza can represent multiple resources. In the preceding example, WebSEAL inserts snippets into the responses when accessing myResource.html over a local junction or virtual junction.

If the configured <filename> value is a non-existent file, WebSEAL fails to restart with a DPWIV0752E Could not open file error.

Default: None.

Example:

[snippet-filter:/stdjunction/sampleResource.html]
*test* = samplesnippet.html
?hello* = samplesnippet2.html

Parent topic: Stanza reference