THINK-217-TRN

Added in a new frontend API. The implementation I think is a bit hacky. But its the only way to get reliable cross-domain support. So basically the campaign root includes a script on the API domain which sets a `token` variable that Adam can use to authenticate to the API. This allows us to track reliably our visitors across domains.
Right. 'We' as in our team. 120 is also the limit of what displays nicely on github

On Fri, Oct 3, 2014 at 10:11 PM, Tataihono Nikora
<notifications@github.com> wrote:

>> @@ -0,0 +1,37 @@
>> +module Api
>> +  class V1Controller < ApplicationController
>> +    before_action :cors_set_access_control_headers
>> +    before_action :authenticate_user_from_token!
>> +    before_action :load_campaign
>> +
>> +    protected
>> +
>> +    def cors_set_access_control_headers
>> +      headers['Access-Control-Allow-Origin'] =
>> +        '*'
> We're as in cruglobal projects? Because the rubocop default is 80?
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/CruGlobal/watchthinkchat/pull/34/files#r18427009