From 9864f818cc526eecc3d6e2cf458d9678b29aa343 Mon Sep 17 00:00:00 2001
From: esikkala <esko.ikkala@aalto.fi>
Date: Wed, 5 Dec 2018 12:59:14 +0200
Subject: [PATCH] Production env: API url based on location.hostname

---
 src/client/epics/index.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/client/epics/index.js b/src/client/epics/index.js
index ec90bbdc..6c48755f 100644
--- a/src/client/epics/index.js
+++ b/src/client/epics/index.js
@@ -1,4 +1,3 @@
-
 import { ajax } from 'rxjs/ajax';
 import { mergeMap, map, withLatestFrom } from 'rxjs/operators';
 import { combineEpics, ofType } from 'redux-observable';
@@ -16,7 +15,7 @@ import {
 
 const apiUrl = (process.env.NODE_ENV === 'development')
   ? 'http://localhost:3001/'
-  : 'http://test.ui.mappingmanuscriptmigrations.org/';
+  : location.hostname;
 
 const getManuscripts = (action$, state$) => action$.pipe(
   ofType(FETCH_MANUSCRIPTS),
-- 
GitLab