Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] No way to disable the canonical header #423

Open
baronvertigovongrahamthesecondofsealand opened this issue Jul 22, 2022 · 0 comments
Open

Comments

@baronvertigovongrahamthesecondofsealand

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:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant