-
Notifications
You must be signed in to change notification settings - Fork 878
Closed
Description
I am having difficulty proxying to a graphql endpoint whose endpoint is http://XXX.XXX.XXX.XXX:8080/graphql. The http-proxy-middleware code I am using in my express.js host is straightforward and simple:
app.use('/graphql', proxy({
target: 'http://XXX.XXX.XXX.XXX:8080',
changeOrigin: true
}));
The problem is that the response to this call is Bad Request (400) if the content type is application/json, which is the default from my Apollo grapqhl client. But curiously if I call the proxied endpoint using text/plain in POSTMAN, it works. If I call the graphql endpoint itself directly with POSTMAN, application/json it works as well. Anyone know why I am getting a Bad Request response?
Metadata
Metadata
Assignees
Labels
No labels