public function addPublicKey(Event $event) {
        $command = $event['command'];
        $request = $command->getRequest();
        $url = $request->getUrl(true);

        // Don't add public key if query string already contains public key
        if ($url->getQuery()->hasKey('publicKey')) {
            return;
        }

        $client = $request->getClient();
        $publicKey = $client->getPublicKey();
        $user = $client->getUser();

        // No need for the header if the user and public key matches
        if ($user && $user === $publicKey) {
            return;
        }

        $request->setHeader('X-Imbo-PublicKey', $publicKey);
    }