[CB-2235] Fixed file transfer whitelisting.

The user agent in the request header is sometimes nil, so we get it from the webview instead.