MindscapeHQ / raygun4js

JavaScript provider for Raygun
https://raygun.com
Other
148 stars 60 forks source link

Issue with setting raygun cookie as secure #291

Closed strydomc closed 6 years ago

strydomc commented 6 years ago

Hi,

I have an issue with setting the 'setCookieAsSecure' flag from the latest release 2.11.0. Where the argument in the options block isn't being set for the 'raygun4js-userid' session cookie.

Setup:

var rg4js = require('raygun4js');
angular.module('app').config(
  rg4js('apiKey', 'api_key_placeholder');
  rg4js('options', {setCookieAsSecure: true});
);

Any help would be appreciated thanks.

samuel-holt commented 6 years ago

Hi there,

Thanks for bringing this to our attention, we will need to investigate this further to work out why the setCookieAsSecure option is not working.

Cheers,

Sam

UberMouse commented 6 years ago

Hi @strydomc,

I suspect your problem is because you are attempting to use the V2 API with the NPM module. With how the V2 API works it is only supported with the snippet method and you will need to use the V1 API with the NPM module.

strydomc commented 6 years ago

Hi @UberMouse,

So we were previously on version 1.18.7 of the NPM module and we need the setCookieAsSecure flag option for a current piece of work that we are doing. Which came in the 2.11.0 release.

Is the setCookieAsSecure only available in the 2.11.0 release or is there a previous release which will allow us to use this property?

Thanks

UberMouse commented 6 years ago

Hi @strydomc,

Sorry for the late reply, I must have missed the notification before. The V1 API still works with V2 of Raygun4JS. The setCookieAsSecure was only added in 2.11.0 so it can't be used in any version before that.