Default remote URLs to production

This commit is contained in:
Gregory Schier 2017-05-16 10:19:28 -07:00
parent aa870c2252
commit 9db8f977c4
2 changed files with 3 additions and 8 deletions

View File

@ -49,9 +49,7 @@ export const MAX_RESPONSES = 20;
export const REQUEST_TIME_TO_SHOW_COUNTER = 1; // Seconds export const REQUEST_TIME_TO_SHOW_COUNTER = 1; // Seconds
export const GA_ID = 'UA-86416787-1'; export const GA_ID = 'UA-86416787-1';
export const GA_HOST = 'desktop.insomnia.rest'; export const GA_HOST = 'desktop.insomnia.rest';
export const CHANGELOG_URL = isDevelopment() export const CHANGELOG_URL = process.env.INSOMNIA_SYNC_URL || 'https://changelog.insomnia.rest/changelog.json';
? 'http://localhost:1313/changelog-json/'
: 'https://changelog.insomnia.rest/changelog.json';
export const CHANGELOG_PAGE = 'https://insomnia.rest/changelog/'; export const CHANGELOG_PAGE = 'https://insomnia.rest/changelog/';
export const STATUS_CODE_RENDER_FAILED = -333; export const STATUS_CODE_RENDER_FAILED = -333;
export const LARGE_RESPONSE_MB = 5; export const LARGE_RESPONSE_MB = 5;

View File

@ -70,11 +70,8 @@ async function _fetch (method, path, json, sessionId = null) {
} }
function _getUrl (path) { function _getUrl (path) {
if (isDevelopment()) { const baseUrl = process.env.INSOMNIA_SYNC_URL || 'https://api.insomnia.rest';
return `http://localhost:8000${path}`; return `${baseUrl}${path}`;
} else {
return `https://api.insomnia.rest${path}`;
}
} }
function _notifyCommandListeners (uri) { function _notifyCommandListeners (uri) {