From 2f6eed237a9d088c8dcb3b75909370a96b77bd4f Mon Sep 17 00:00:00 2001 From: "Adolfo R. Brandes" Date: Tue, 13 Dec 2022 13:51:56 -0300 Subject: [PATCH] fix: Editors should support runtime configuration Fetching settings directly via `process.env` circumvents the runtime configuration mechanism. Change the editor page to use `getConfig()` instead. --- src/editors/EditorContainer.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/editors/EditorContainer.jsx b/src/editors/EditorContainer.jsx index 1e0842d62..46dcfc298 100644 --- a/src/editors/EditorContainer.jsx +++ b/src/editors/EditorContainer.jsx @@ -2,6 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { useParams } from 'react-router'; import { EditorPage } from '@edx/frontend-lib-content-components'; +import { getConfig } from '@edx/frontend-platform'; const EditorContainer = ({ courseId, @@ -13,8 +14,8 @@ const EditorContainer = ({ courseId={courseId} blockType={blockType} blockId={blockId} - studioEndpointUrl={process.env.STUDIO_BASE_URL} - lmsEndpointUrl={process.env.LMS_BASE_URL} + studioEndpointUrl={getConfig().STUDIO_BASE_URL} + lmsEndpointUrl={getConfig().LMS_BASE_URL} /> );