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 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
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
into kong using kubernetes??
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