How can I detect if a tcp connection has been forwarded from a ssl connection?

后端 未结 2 709
小蘑菇
小蘑菇 2021-02-06 13:51

The specific scenario I\'m dealing with is attempting to connect to a websocket connection behind an AWS elastic load balancer, whilst enforcing https/ssl rather than http/tcp.<

2条回答
  •  感情败类
    2021-02-06 14:32

    When you use TCP, the ELB will not inject HTTP headers such as x-forwarded-proto or x-forwarded-for. You may be able to get what you need by configuring Proxy Protocol.

提交回复
热议问题