# Enable wss in AWS and k8s

**URL:** <https://discuss.konghq.com/t/enable-wss-in-aws-and-k8s/10602>\
**Category:** General\
**Tags:** kubernetes, kong-gateway\
**Created:** [August 30, 2022, 4:50pm UTC](https://discuss.konghq.com/t/enable-wss-in-aws-and-k8s/10602 "2022-08-30T16:50:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcos](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/marcos/32/3608_2.png) [@Marcos](https://discuss.konghq.com/u/Marcos)\
**Post date:** [August 30, 2022, 4:50pm UTC](https://discuss.konghq.com/t/enable-wss-in-aws-and-k8s/10602/1 "2022-08-30T16:50:44Z")

</div>

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:

```auto
 ...

  location / {
    proxy_pass http://127.0.0.1:3000;
    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

```auto
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";

```

into kong using kubernetes??

```auto
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
  name: global-kong-cors
  namespace: test
config:
  origins:
  - "*"
  methods:
  - "*"
  headers:
  - 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 <------------??????
  exposed_headers:
  - X-Auth-Token
  credentials: true
  max_age: 3600
  preflight_continue: false
plugin: cors

```

Thanks

---

<div class="post-metadata">

**Author:** ![traines](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/traines/32/158_2.png) [@traines](https://discuss.konghq.com/u/traines)\
**Post date:** [September 6, 2022, 11:15pm UTC](https://discuss.konghq.com/t/enable-wss-in-aws-and-k8s/10602/2 "2022-09-06T23:15:34Z")

</div>

Kong will proxy the Connection and Upgrade headers automatically; you shouldn’t need to explicitly configure them: [Proxy Reference - v2.8.x | Kong Docs](https://docs.konghq.com/gateway/latest/reference/proxy/#proxy-websocket-traffic)

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