From d3c1e383da903841e83c149a26e20cf78c0929fc Mon Sep 17 00:00:00 2001 From: garrettmills Date: Sun, 18 Oct 2020 21:36:10 -0500 Subject: [PATCH] Add more environment configs for libflitter values --- config/auth.config.js | 4 ++-- config/server.config.js | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/config/auth.config.js b/config/auth.config.js index 4e7951c..ae31776 100644 --- a/config/auth.config.js +++ b/config/auth.config.js @@ -122,7 +122,7 @@ const auth_config = { // Information about the endpoint flitter-auth will use to redeem // the authorization_code token for a bearer token source_token: { - endpoint: 'https://coreid.garrettmills.dev/auth/service/oauth2/redeem', + endpoint: env('AUTH_COREID_REDEEM_URL', 'https://coreid.garrettmills.dev/auth/service/oauth2/redeem'), // Field name where the authorization_code token will be specified in the request token_key: 'code', @@ -143,7 +143,7 @@ const auth_config = { // Information about the endpoint flitter-auth will use to get // user information after it retrieves a bearer token user_data: { - endpoint: 'https://coreid.garrettmills.dev/api/v1/auth/users/me', + endpoint: env('AUTH_COREID_USER_URL', 'https://coreid.garrettmills.dev/api/v1/auth/users/me'), method: 'get', // 'get' or 'post' only // In the response data, what key is the user data in? diff --git a/config/server.config.js b/config/server.config.js index 56689c1..bbbe4de 100644 --- a/config/server.config.js +++ b/config/server.config.js @@ -20,7 +20,11 @@ const server_config = { * The logging level. Usually, 1-4. * The higher the level, the more information is logged. */ - level: env("LOGGING_LEVEL", 1) + level: env("LOGGING_LEVEL", 1), + + api_logging: env('LOG_API_RESPONSES', false), + + error_logging: env('LOG_REQUEST_ERRORS', true), }, session: {