Referrer middleware now overwrites referrer if it is an empty string