<?php
defined('TYPO3_MODE') || die();

call_user_func(static function () {

    // Register signal slot
    $signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class);
    $signalSlotDispatcher->connect(
        \TYPO3\CMS\Seo\Canonical\CanonicalGenerator::class,
        'beforeGeneratingCanonical',
        \Zeroseven\Seo\Canonical\CanonicalGenerator::class,
        'checkWhitelistCanonical'
    );
});