Skip to content

Commit

Permalink
Use original credential for query request in playg
Browse files Browse the repository at this point in the history
Currently the playground doesn't forward any credentials when making
query calls. This can cause problems if your playground requires
credential logins.
  • Loading branch information
creativej committed Jul 19, 2018
1 parent f855a89 commit edb3ea4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions handler/playground.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ var page = template.Must(template.New("graphiql").Parse(`<!DOCTYPE html>
GraphQLPlayground.init(root, {
endpoint: location.protocol + '//' + location.host + '{{.endpoint}}',
subscriptionsEndpoint: wsProto + '//' + location.host + '{{.endpoint }}',
settings: {
'request.credentials': 'same-origin'
}
})
})
</script>
Expand Down

0 comments on commit edb3ea4

Please sign in to comment.