don't strip x-hasura-access-key from headers for explain/analyze query, closes #1533 (#1534)

This commit is contained in:
Karthik Venkateswaran 2019-01-31 11:13:24 +05:30 committed by Vamshi Surabhi
parent 2893fe7126
commit 1268ef63df

View File

@ -248,7 +248,10 @@ const analyzeFetcher = (url, headers, analyzeApiChange) => {
totalHeaders.forEach(t => { totalHeaders.forEach(t => {
// If header has x-hasura-* // If header has x-hasura-*
const lHead = t.toLowerCase(); const lHead = t.toLowerCase();
if (lHead.slice(0, 'x-hasura-'.length) === 'x-hasura-') { if (
lHead.slice(0, 'x-hasura-'.length) === 'x-hasura-' &&
lHead !== 'x-hasura-access-key'
) {
user[lHead] = reqHeaders[t]; user[lHead] = reqHeaders[t];
delete reqHeaders[t]; delete reqHeaders[t];
} }