Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set Accept header to 'application/json' for GraphQL queries (#7312)
## Changes This PR fixes setting `Accept` header to `'application/json'` which is required by some proxies to work. ## Test plan Tested with a local reverse proxy. Prerequisites (YOUR_TOKEN is a token configured for your user at YOUR_INSTANCE): 1. Right cody_setting.json configuration: ``` { "cody.override.serverEndpoint": "https://localhost:443", "cody.auth.externalProviders": [ { "endpoint": "https://localhost:443", "executable": { "commandLine": ["echo '{ \"headers\": { \"Authorization\": \"token YOUR_TOKEN\" } }'"], "shell": "/bin/bash" } }, ``` 2. Proxy running in the console: mitmproxy -m reverse:https://YOUR_INSTANCE/ -p 443 Then you can start cody, and in the proxy console you should be able to inspect one of the graphql requests and see something like this: 
- Loading branch information