I am using an angular app to login to a Drupal website. Angular version is 1.5.3 and angular-cookies version is 1.4.0.
After logging in, I need to save the session name and ID to a cookie for further authentication. So i am using ngCookies to save this session data to a cookie. My understanding is that I need to save the cookie with 'domain' set to the domain of the Drupal website, which is local.mydomain.com. So I use this code a per the instructions on the ngCookie page (https://docs.angularjs.org/api/ngCookies/service/$cookies): $cookies.put(key, value, { 'domain':'local.mydomain.com' }); This doesn't work, so I have tried using $cookiesProvider to set the default domain: .config(['$cookiesProvider', function($cookiesProvider) { // Set $cookies defaults $cookiesProvider.defaults.domain = 'local.mydomain.com'; $cookiesProvider.defaults.path = '/'; }]) But this doesn't work either. The domain is always saved as 'localhost'. Any help much appreciated. -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
