From 9db8f977c43789f2feff4258cc38853dbfa035bc Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Tue, 16 May 2017 10:19:28 -0700 Subject: [PATCH] Default remote URLs to production --- app/common/constants.js | 4 +--- app/common/fetch.js | 7 ++----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/app/common/constants.js b/app/common/constants.js index 4079346aec..8c97696c38 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 3073171537..90654c73e5 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) {