ignore case when comparing header names to detect access key (fix #286) (#287)

This commit is contained in:
Aswin M Prabhu 2018-08-15 14:17:18 +05:30 committed by Shahidh K Muhammed
parent 6ba9c759e6
commit b47172974f

View File

@ -272,7 +272,7 @@ class ApiRequest extends Component {
onBlur={this.handleBlur}
data-test={`header-value-${i}`}
type={
header.key === 'X-Hasura-Access-Key' &&
header.key.toLowerCase() === 'x-hasura-access-key' &&
!this.state.accessKeyVisible
? 'password'
: 'text'
@ -281,7 +281,7 @@ class ApiRequest extends Component {
</td>
{header.isNewHeader ? null : (
<td>
{header.key === 'X-Hasura-Access-Key' ? (
{header.key.toLowerCase() === 'x-hasura-access-key' ? (
<i
className={styles.showAccessKey + ' fa fa-eye'}
data-header-id={i}