Dejell
Dejell

Reputation: 14317

non HTTP response code - Amazon ELB

My REST API returns non-standard HTTP response codes: e.g. 40001, 40002.

It works just fine on local servers, however, when I need to serve them via Amazon ELB (Load Balancer) I get 502 error.

Is there a way to return non-standard HTTP response codes for servers running behind Amazon ELB?

Upvotes: 0

Views: 278

Answers (1)

Mircea
Mircea

Reputation: 10566

http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/elb-listener-config.html#elb-listener-protocols

Not all HTTP extensions are supported in the load balancer. You may need to use a TCP listener if the load balancer is not able to terminate the request due to unexpected methods, response codes, or other non-standard HTTP 1.0/1.1 implementations.

So basically, if you want to use non-standard error codes you're probably going to have to go with a TCP listener.

Upvotes: 2

Related Questions