question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"request.credentials": "include" does not allow sending Cookie header

See original GitHub issue

This issue pertains to the following package(s):

  • GraphQL Playground - Electron App
  • GraphQL Playground HTML
  • GraphQL Playground
  • GraphQL Playground Express Middleware
  • GraphQL Playground Hapi Middleware
  • GraphQL Playground Koa Middleware
  • GraphQL Playground Lambda Middleware

What OS and OS version are you experiencing the issue(s) on?

MacOS 10.13.6

What version of graphql-playground(-electron/-middleware) are you experiencing the issue(s) on?

1.7.0 (homebrew)

What is the expected behavior?

When I update the settings to include property "request.credentials": "include" and I set an HTTP header in the UI like

{
  "Cookie":"xxxx" 
}

I expect to see the Graphql Playground app transmit the Cookie header in the requests it sends.

What is the actual behavior?

No Cookie header is sent regardless of the presence of the above configuration

What steps may we take to reproduce the behavior?

  • change settings in the Graphql Playground electron app to include "request.credentials": "include"
  • set a Cookie header in the “HTTP Headers” pane:
{
  "Cookie":"xxxx" 
}
  • Send a query and observe (eiter logging from the graphql endpoint or on the wire via traffic capture) that no Cookie header is being sent.
  • Change the name of the cookie header, e.g. “Cookie123” and repeat the test, and observe the header is now transmitted as expected.

Please provide a gif or image of the issue for a quicker response/fix.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9

github_iconTop GitHub Comments

11reactions
jirikreplcommented, May 16, 2019

Hello, in what version should this be fixed, please?

I see exactly the same behavior on mac with version 1.8.10 (1.8.10.5129)

header with name cookie is is filtered in request from GraphQL Playground. From my frontend request, I have cookie header set correctly

3reactions
axos88commented, Jan 7, 2020

Same here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Credentials: 'include' not including Cookie header
I find out credentials: include just meaning u can send cookie but it doesn't meaning you can send cookie with two different domain....
Read more >
Handling cookies with Fetch's credentials - Zell Liew
Note: Fetch always sends Authorization headers if you include it (assuming Access-Control-Allowed-Headers contains Authorization ). The ...
Read more >
Cookie not set in Request Headers, even with 'same-origin ...
I am having trouble setting this and sending the Cookie header in a fetch request. I have looked at: #163 (comment) #142 #56...
Read more >
Request.credentials - Web APIs | MDN
A RequestCredentials dictionary value indicating whether the user agent should send or receive cookies from the other domain in the case of ...
Read more >
7 Keys to the Mystery of a Missing Cookie - Medium
If the server doesn't allow credentials being sent along, the browser will just not attach cookies and authorization headers.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found