From 5306dfff13ad46cddc4e56f6607e2d30e2d14889 Mon Sep 17 00:00:00 2001 From: Grzegorz Leoniec Date: Mon, 26 Nov 2018 17:55:39 +0100 Subject: [PATCH] Fix proxy reload issue --- plugins/apollo-config.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/apollo-config.js b/plugins/apollo-config.js index db04e3406..7d0ae7564 100644 --- a/plugins/apollo-config.js +++ b/plugins/apollo-config.js @@ -1,11 +1,12 @@ export default function({ app }) { + const backendUrl = process.BACKEND_URL || 'http://localhost:4000' return { - httpEndpoint: '/api', + httpEndpoint: process.server ? backendUrl : '/api', httpLinkOptions: { credentials: 'same-origin' }, credentials: true, - tokenName: 'apollo-token', + tokenName: 'human-connection-token', persisting: false, websocketsOnly: false }