Enable wss in AWS and k8s

Hi I am having some problems making work websockets using AWS Classic load balancer and kong gateway in Kubernetes.

My nginx file that I use to test the app is:


  location / {
    proxy_pass        ;
    proxy_http_version          1.1;
    proxy_set_header            X-Forwarded-Host $host;
    proxy_set_header            X-Forwarded-Server $host;
    proxy_set_header            X-Real-IP $remote_addr;
    proxy_set_header            X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header            X-Forwarded-Proto $scheme;
    proxy_set_header            Host $http_host;
    proxy_set_header            Upgrade $http_upgrade;
    proxy_set_header            Connection "Upgrade";
    proxy_pass_request_headers  on;

After configure Kong in kubernetes throw a AWS Classic Load Balancer, I am having issues with websockets.

How can I add those headers

proxy_set_header            Upgrade $http_upgrade;
proxy_set_header            Connection "Upgrade";

into kong using kubernetes??

apiVersion: configuration.konghq.com/v1
kind: KongPlugin
  name: global-kong-cors
  namespace: test
  - "*"
  - "*"
  - Accept
  - Accept-Version
  - Content-Length
  - Content-MD5
  - Date
  - X-Auth-Token
  - ord-request-id
  - ord-api-version
  - x-posconfig
  - x-access-token
  - DNT
  - X-CustomHeader
  - Keep-Alive
  - User-Agent
  - X-Requested-With
  - If-Modified-Since
  - Cache-Control
  - Content-Type
  - Authorization
  - Upgrade:WebSocket <------------??????
  - Connection:Upgrade <------------??????
  - X-Auth-Token
  credentials: true
  max_age: 3600
  preflight_continue: false
plugin: cors


Kong will proxy the Connection and Upgrade headers automatically; you shouldn’t need to explicitly configure them: Proxy Reference - v2.8.x | Kong Docs

What are you seeing upstream? Are those headers getting stripped?