title: Unable to set secure flag for cookies using $cookies.putObject in Angularjs version 1.4.4
body: <p>We are unable to set the secure flag for cookies using the $cookies service in Angularjs 1.4.4.
  We are using the putObject() method mentioned in <a href="https://code.angularjs.org/1.4.4/docs/api/ngCookies/service/" rel="nofollow">https://code.angularjs.org/1.4.4/docs/api/ngCookies/service/</a>$cookies for the same.</p>
  
  <p>Below is the same code snippet we are using for the same:</p>
  
  <pre><code>var config = {
      secure: true
  };
  $cookies.putObject('foo', 'bar', config);
  </code></pre>
  
  <p>We cannot see the secure flag being set when we inspect the cookie that's being created. 
  Also, if we try to do a <code>$cookies.getObject('foo')</code> we get an undefined object in response. We already have all the necessary modules like "ngCookies" injected in our application.</p>