Skip to content

Commit 8f5c4ee

Browse files
committed
Use client and server Rollbar tokens
1 parent 0b3d6a1 commit 8f5c4ee

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

etc/config.sample.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
"url": "https://www.google.com/recaptcha/api/siteverify"
5050
},
5151
"rollbar": {
52-
"access_token": null,
52+
"access_token_client": null,
53+
"access_token_server": null,
5354
"environment": "local"
5455
}
5556
}

src/libraries/Logger.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public static function getTimingHeader($tags = true) {
2929

3030
public static function initialize() {
3131
parent::initialize();
32-
if (Common::$config->rollbar->access_token) {
32+
if (Common::$config->rollbar->access_token_server) {
3333
self::$rollbar_available = true;
3434

3535
$rollbar_handle_exceptions = false;
@@ -38,7 +38,7 @@ public static function initialize() {
3838

3939
Rollbar::init(
4040
[
41-
'access_token' => Common::$config->rollbar->access_token,
41+
'access_token' => Common::$config->rollbar->access_token_server,
4242
'environment' => Common::$config->rollbar->environment,
4343
],
4444
$rollbar_handle_exceptions,

src/templates/rollbar.inc.js.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php namespace BNETDocs\Templates; use CarlBennett\MVC\Libraries\Common; ?>
22
<script>
33
var _rollbarConfig = {
4-
accessToken: "<?php echo Common::$config->rollbar->access_token; ?>",
4+
accessToken: "<?php echo Common::$config->rollbar->access_token_client; ?>",
55
captureUncaught: true,
66
captureUnhandledRejections: true,
77
payload: {

0 commit comments

Comments
 (0)