Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphiQL not sending headers #11

Open
ArifADS opened this issue Mar 7, 2024 · 1 comment
Open

GraphiQL not sending headers #11

ArifADS opened this issue Mar 7, 2024 · 1 comment

Comments

@ArifADS
Copy link

ArifADS commented Mar 7, 2024

I was playing with this library and noticed that I wasn't getting the custom headers from GraphiQL in my Request object headers, checking the network tab in Chrome looks like it's not even sending it.

I have no knowledge of the of the graphiql js so I can fix it myself. Is it posible to know how can this be fixed?

@alexsteinerde
Copy link
Owner

What do you mean with custom headers?
Do you mean credentials like authorization headers or cookies?
If you mean credentials and you use different hosts, I recommend using the credentials parameter when enabling GraphiQL: , credentials: GraphiQLCredentialMode = .sameOrigin (https://github.com/alexsteinerde/graphiql-vapor/blob/efcc777aa9972b67c9c7e6a3bf6e8c3d838741d1/Sources/GraphiQLVapor/GraphiQLVapor.swift#L10C87-L10C138) which I implemented in #7 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants