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

Playground forces https on all requests #1426

Open
3 of 7 tasks
WaisKamal opened this issue Dec 13, 2023 · 0 comments
Open
3 of 7 tasks

Playground forces https on all requests #1426

WaisKamal opened this issue Dec 13, 2023 · 0 comments

Comments

@WaisKamal
Copy link

WaisKamal commented Dec 13, 2023

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?

Windows 11 21H2

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

The one that is bundled with GraphQL 16.8.1

What is the expected behavior?

The issue occurs when using the playground with a GraphQL API that is:

  1. not hosted on localhost, and
  2. served over http rather than https

For example, if the playground is loaded via http://192.168.8.102:8539/graphql, all query requests should be going to the same URL.

What is the actual behavior?

The playground insists on sending the query requests on the same URL but via https. For example, in the above case, the requests go to https://192.168.8.102:8539/graphql. This can be observed in the browser's devtools in the network tab.

What steps may we take to reproduce the behavior?

  1. Set up a GraphQL server
  2. Navigate to the playground hosted by the server via localhost and make a query
  3. Now navigate to the playground via the server's IP address (remote or local, doesn't matter) and make a query

The first query works while the second fails. The two images below show the failed request (the first shows the request URL, the second shows the request body).

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

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

1 participant