From eb53329b175c8cb93b26d99bae88c62e3eaef160 Mon Sep 17 00:00:00 2001 From: Matias Date: Mon, 15 Jul 2019 11:18:17 -0300 Subject: [PATCH] Adding header for custom token --- server/src/app.js | 2 +- server/src/createRemoteSchema.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/app.js b/server/src/app.js index b00b26150..e40e13a0d 100644 --- a/server/src/app.js +++ b/server/src/app.js @@ -182,7 +182,7 @@ async function run () { headers: Object.assign( res.locals.userId ? { userId: res.locals.userId } : {}, req.headers.authorization ? { authorization: req.headers.authorization } : {}, - req.headers.access_token ? { access_token: req.headers.access_token } : {} + req.headers.keyvault ? { keyvault: req.headers.keyvault } : {} ) } return response diff --git a/server/src/createRemoteSchema.js b/server/src/createRemoteSchema.js index 05ea3023a..500eebeee 100644 --- a/server/src/createRemoteSchema.js +++ b/server/src/createRemoteSchema.js @@ -31,7 +31,7 @@ export const createRemoteSchema = async (uri, preshared_key) => { headers: { Authorization: previousContext.graphqlContext.headers.authorization ? previousContext.graphqlContext.headers.authorization : '', UserId: previousContext.graphqlContext.headers.userId ? previousContext.graphqlContext.headers.userId : '', - access_token: previousContext.graphqlContext.headers.access_token ? previousContext.graphqlContext.headers.access_token : '' + keyvault: previousContext.graphqlContext.headers.keyvault ? previousContext.graphqlContext.headers.keyvault : '' } } )