From 28924c059ddfb615642d0ce5d2c6bd58c0934c77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Salgado?= Date: Thu, 31 Mar 2022 20:01:22 +0100 Subject: [PATCH] fix: graphql server path --- new-lamassu-admin/src/utils/apollo.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/new-lamassu-admin/src/utils/apollo.js b/new-lamassu-admin/src/utils/apollo.js index 022cec4a..8b28843f 100644 --- a/new-lamassu-admin/src/utils/apollo.js +++ b/new-lamassu-admin/src/utils/apollo.js @@ -12,7 +12,10 @@ import AppContext from 'src/AppContext' const URI = process.env.NODE_ENV === 'development' ? 'https://localhost:8070' : '' -const ALT_URI = 'http://localhost:4001' +const ALT_URI = + process.env.NODE_ENV === 'development' + ? 'https://localhost:4001' + : `https://${window.location.hostname}:4001` const uploadLink = createUploadLink({ credentials: 'include',