Currently, we use Live Helper Chat from our main corporate website, to allow customers to chat directly to our customer services team.
We are in the process of developing a mobile app and a new microsite for out customers. We want to provide chat functionality from these new platforms.
Live Helper Chat comes with a fairly comprehensive REST API, which the mobile app can use, to allow the customer to chat with customer services.
Unfortunately, out of the box, our Bitnami installation of Live Helper Chat breaks access to the REST API.
API calls require an Authorization header, Apache filters this header out. So all of our calls to the API resulted in a “Authorization header is missing!” response.
The solution is very simple, once you have spent ages working out what it is.
Adding this line
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
To the bitnami.conf file, within the virtual host section allows the Authorization header to be passed to the API
<VirtualHost _default_:80> SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
The bitnami.conf file is here
Fix Bitnami Query String Stripping
If you want to use the Live Helper Chat API, and you are using the Bitnami version, there is another problem which you will need to fix.
By default, the htaccess file rewrite rules will strip out any query strings from URLs, many calls to the API rely on query strings, they will not work with the default Bitnami rewrite rules.
Look for the htaccess.conf file, which should be here
and change this line
RewriteRule ^(.*)?$ index.php?/$1 [L]
RewriteRule ^(.*)?$ index.php?/$1 [L,QSA]