seo
seo copied to clipboard
[FR] No way to disable the canonical header
Description
There is no configuration to disable the canonical header. Sometimes there is a need to do so, without keeping an edited and unmaintained version of the plugin.
In SeoService.php:
public function injectCanonical ()
{
list($field) = $this->_getElementAndSeoFields();
Craft::$app->getResponse()->getHeaders()->add(
'Link',
'<' . $field->canonical . '>; rel="canonical"'
);
}
This needs a configurable switch to toggle injection.
Additional info
- Craft version: 3.7.48
- SEO version: 3.7.4
- PHP version: 7.3.33
- Database driver & version: php7.3-mysql 7.3.33-4+ubuntu18.04.1+deb.sury.org+1, MySQL 5.7.38
- Other Plugins: