Adding header for custom token

This commit is contained in:
Matias committed 2019-07-15 11:18:17 -03:00
1 parent 2c9874e4e2
commit eb53329b17
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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
+1 -1
View File
@@ -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 : ''
}
}
)