Skip to main content

GenericCanonicalLinkDetector

Replace all URLs encountered with their canonical version (when applicable).

Notes

Detects canonical URLs from HTTP response headers (Link: rel="canonical") and HTML <link rel="canonical"> tags. Non-canonical documents are replaced by their canonical equivalents. Optionally restricted to specific content types.

Usage

class: GenericCanonicalLinkDetector
contentTypes:
- string

Properties

PropertyTypeRequiredDefault
contentTypesstring[]No-

Property Details

contentTypes

One or more content types (e.g., text/html) for which to enable canonical link detection. Leave empty to enable detection for all content types.