Skip to content

Commit 335ede5

Browse files
author
Vikas Agarwal
committed
Configurable session length, via env variables.
1 parent c417dc4 commit 335ede5

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

config/custom-environment-variables.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"lookerConfig": {
5959
"EMBED_KEY": "LOOKER_EMBED_KEY",
6060
"LOOKER_HOST": "LOOKER_HOST",
61+
"SESSION_LENGTH": "SESSION_LENGTH",
6162
"BASE_URL": "LOOKER_API_BASE_URL",
6263
"CLIENT_ID": "LOOKER_API_CLIENT_ID",
6364
"CLIENT_SECRET": "LOOKER_API_CLIENT_SECRET",

config/default.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"lookerConfig": {
6464
"EMBED_KEY": "FAKE_KEY",
6565
"LOOKER_HOST": "demo.looker.com",
66+
"SESSION_LENGTH": 86400,
6667
"BASE_URL": "",
6768
"CLIENT_ID": "",
6869
"CLIENT_SECRET": "",

src/services/lookerService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function createdSignedEmbedUrl(options) {
102102
* @returns {String} URL for embedding the looker report, it can be GET only once
103103
*/
104104
function generateEmbedUrl(authUser, project, member, reportUrl) {
105-
const SESSION_LENGTH = 86400;
105+
const SESSION_LENGTH = config.lookerConfig.SESSION_LENGTH;
106106
const urlData = {
107107
host: config.lookerConfig.LOOKER_HOST,
108108
secret: config.lookerConfig.EMBED_KEY,

0 commit comments

Comments
 (0)