I have a Flarum embed on my main website (example.com) loading the comments from specific forum discussions. So for those discussions on Flarum I want to set my<link rel="canonical"> to point to example.com, in order to avoid duplicated content on Google.
So I created an extension, defined the observer for
(new Extend\Frontend('forum'))->content(AnotherNiceComponent::class), created the proper logic and set the canonicalUrl on Flarum Document. So good, so far.
$this->content (line 62), my callback is executed right before
Flarum\Forum\Content\Discussion, so the canonicalUrl I defined got overwritten on line 92 of this Discussion class.
Is there a way to change the order / priority for those callbacks?