title: Cross domain session with Sinatra and AngularJS
body: <p>I am using Sinatra as a webservice and angularjs to make the calls</p>
  
  <pre><code>post '/loginUser' do
      session[:cui]=user['cui']
  end
  get '/cui' do
    return session[:cui].to_s
  end
  </code></pre>
  
  <p>But it doesn't seem to work (the '/cui' call returns an empty string) any help would be greatly apreciated.</p>
  
  <p>UPDATE:
  setting this in sinatra   headers['Access-Control-Allow-Credentials'] = 'true' allows me to send the session, but it seems like $http directive is not using the browsers cookies</p>