I need to compare these two strings, so for example:
if($this->getRequest()->headers->get('referer') != $this->generateUrl('foo')) {}
The thing is that the referrer here gives me the full url address:
http://website.com/foo
And the generateUrl() method gives me only the following:
/foo
How can I solve this?