isawk
isawk

Reputation: 1057

gae nodejs proxy to IIS ASP api producing invalid json response

I have an angular application running on Google Cloud AppEngine on nodejs12 runtime.

When I proxy an api request from express server in Google cloud environment to an ASP application running on IIS, I recieve very strange response

Invali Json Response

Requests are sent with header content-type: application/json; charset=utf-8

Test on postman and locally running nodejs12/express with the same proxy settings return valid JSON.

Expecting to receive valid JSON.

Upvotes: 0

Views: 92

Answers (1)

isawk
isawk

Reputation: 1057

https://github.com/chimurai/http-proxy-middleware/issues/97 found fix,

apparently proxy requires 'accept-encoding': 'gzip;q=0,deflate,sdch',

it was not a GAE issue was a http-proxy-middleware issue

Upvotes: 0

Related Questions