diff --git a/app/common/constants.js b/app/common/constants.js index 4079346ae..8c97696c3 100644 --- a/app/common/constants.js +++ b/app/common/constants.js @@ -49,9 +49,7 @@ export const MAX_RESPONSES = 20; export const REQUEST_TIME_TO_SHOW_COUNTER = 1; // Seconds export const GA_ID = 'UA-86416787-1'; export const GA_HOST = 'desktop.insomnia.rest'; -export const CHANGELOG_URL = isDevelopment() - ? 'http://localhost:1313/changelog-json/' - : 'https://changelog.insomnia.rest/changelog.json'; +export const CHANGELOG_URL = process.env.INSOMNIA_SYNC_URL || 'https://changelog.insomnia.rest/changelog.json'; export const CHANGELOG_PAGE = 'https://insomnia.rest/changelog/'; export const STATUS_CODE_RENDER_FAILED = -333; export const LARGE_RESPONSE_MB = 5; diff --git a/app/common/fetch.js b/app/common/fetch.js index 307317153..90654c73e 100644 --- a/app/common/fetch.js +++ b/app/common/fetch.js @@ -70,11 +70,8 @@ async function _fetch (method, path, json, sessionId = null) { } function _getUrl (path) { - if (isDevelopment()) { - return `http://localhost:8000${path}`; - } else { - return `https://api.insomnia.rest${path}`; - } + const baseUrl = process.env.INSOMNIA_SYNC_URL || 'https://api.insomnia.rest'; + return `${baseUrl}${path}`; } function _notifyCommandListeners (uri) {