Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
EXAMPLE_VAR=Example Value
ACCESS_TOKEN_COOKIE_NAME=edx-jwt-cookie-header-payload
ACCOUNT_PROFILE_URL=http://localhost:1995
ACCOUNT_SETTINGS_URL=http://localhost:1997
BASE_URL=http://localhost:8080
CREDENTIALS_BASE_URL=http://localhost:18150
CSRF_TOKEN_API_PATH=/csrf/api/v1/token
Expand Down
2 changes: 2 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
EXAMPLE_VAR=Example Value
ACCESS_TOKEN_COOKIE_NAME=edx-jwt-cookie-header-payload
ACCOUNT_PROFILE_URL=http://localhost:1995
ACCOUNT_SETTINGS_URL=http://localhost:1997
BASE_URL=http://localhost:8080
CREDENTIALS_BASE_URL=http://localhost:18150
CSRF_TOKEN_API_PATH=/csrf/api/v1/token
Expand Down
4 changes: 4 additions & 0 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ function extractRegex(envVar) {
const ENVIRONMENT = process.env.NODE_ENV;
let config = {
ACCESS_TOKEN_COOKIE_NAME: process.env.ACCESS_TOKEN_COOKIE_NAME,
ACCOUNT_PROFILE_URL: process.env.ACCOUNT_PROFILE_URL,
ACCOUNT_SETTINGS_URL: process.env.ACCOUNT_SETTINGS_URL,
BASE_URL: process.env.BASE_URL,
PUBLIC_PATH: process.env.PUBLIC_PATH || '/',
CREDENTIALS_BASE_URL: process.env.CREDENTIALS_BASE_URL,
Expand Down Expand Up @@ -168,6 +170,8 @@ export function ensureConfig(keys, requester = 'unspecified application code') {
* @name ConfigDocument
* @memberof module:Config
* @property {string} ACCESS_TOKEN_COOKIE_NAME
* @property {string} ACCOUNT_PROFILE_URL
* @property {string} ACCOUNT_SETTINGS_URL
* @property {string} BASE_URL The URL of the current application.
* @property {string} CREDENTIALS_BASE_URL
* @property {string} CSRF_TOKEN_API_PATH
Expand Down
2 changes: 2 additions & 0 deletions src/setupTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Enzyme.configure({ adapter: new Adapter() });
// These configuration values are usually set in webpack's EnvironmentPlugin however
// Jest does not use webpack so we need to set these so for testing
process.env.ACCESS_TOKEN_COOKIE_NAME = 'edx-jwt-cookie-header-payload';
process.env.ACCOUNT_PROFILE_URL = 'http://localhost:1995';
process.env.ACCOUNT_SETTINGS_URL = 'http://localhost:1997';
process.env.BASE_URL = 'localhost:8080';
process.env.CREDENTIALS_BASE_URL = 'http://localhost:18150';
process.env.CSRF_TOKEN_API_PATH = '/csrf/api/v1/token';
Expand Down