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.