hasura / hasura/graphql-engine

Headers sent to webhook are not always case insensitive

Open
#7,764 3 comments 1 reaction 0 assignees View on GitHub
k/bug
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Version Information

Server Version: 2.0.9
CLI Version (for CLI related issue):

### Environment

Docker

### What is the expected behaviour?

### Keywords

Authentication Webhook, Subscriptions

### What is the current behaviour?

Request headers sent to the authentication webhook are not always case insensitive, they seem to always be lowercase when it is a query/mutation but not so when they are as a result of a subscription.

Subscription
```
{
headers: {
Origin: 'http://localhost:3000',
Authorization: 'Bearer XXXXX',
...
'Sec-WebSocket-Protocol': 'graphql-ws'
},
request: null
}
```

Query
```
{
headers: {
origin: 'http://localhost:3000',
'sec-fetch-dest': 'empty',
'sec-ch-ua-mobile': '?0',
'sec-fetch-site': 'cross-site',
accept: '*/*',
authorization: 'Bearer XXXXX',
'accept-encoding': 'gzip, deflate, br',
Host: 'localhost:8081',
'sec-ch-ua-platform': '"Windows"',
'Content-Length': '253',
'cache-control': 'no-cache',
referer: 'http://localhost:3000/'
},
request: {
variables: {}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.