From 8d16e9f0116770fbb73a2177e417341023531b0d Mon Sep 17 00:00:00 2001 From: Xiao Hu Tai Date: Thu, 4 Jan 2018 16:41:33 +0100 Subject: [PATCH] Override canonical properly if overridden --- src/SEO.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/SEO.php b/src/SEO.php index 8382292..a3b5496 100644 --- a/src/SEO.php +++ b/src/SEO.php @@ -392,10 +392,12 @@ public function setCanonical($canonical = '') } $url = sprintf('%s%s', $paths['canonical'], $canonical); $this->app['resources']->setUrl('canonicalurl', $url); + $this->app['canonical']->setOverride($url); } else { // Absolute link, so we don't add the domain. $this->app['resources']->setUrl('canonicalurl', $canonical); + $this->app['canonical']->setOverride($canonical); } } }