From 54aa1de0fcf7a1ea5b9e051199dca450ed8fa85d Mon Sep 17 00:00:00 2001 From: Shailesh Patil <53746241+mineme0110@users.noreply.github.com> Date: Wed, 22 Nov 2023 17:48:46 +0000 Subject: [PATCH] fix: Add and enable websocket on apisix route (#179) * fix: Add and enable websocket on apisix route * Update infrastructure/charts/mediator/templates/apisixroute.yaml Signed-off-by: Fabio Pinheiro --------- Signed-off-by: Fabio Pinheiro Co-authored-by: Fabio Pinheiro Signed-off-by: Shailesh --- .../mediator/templates/apisixroute.yaml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/infrastructure/charts/mediator/templates/apisixroute.yaml b/infrastructure/charts/mediator/templates/apisixroute.yaml index 3ddf16a1..1f6772c4 100644 --- a/infrastructure/charts/mediator/templates/apisixroute.yaml +++ b/infrastructure/charts/mediator/templates/apisixroute.yaml @@ -30,6 +30,29 @@ spec: header_name: "X-Request-ID" include_in_response: true {{ template "cors" . }} + - name: mediator-ws-rule + match: + hosts: + {{- range .Values.ingress.applicationUrls }} + - {{ . }} + {{- end }} + paths: + - /* + backends: + - serviceName: mediator-service + servicePort: 8080 + websocket: true + plugins: + - name: proxy-rewrite + enable: true + config: + regex_uri: ["^/(.*)","/$1"] + - name: request-id + enable: true + config: + header_name: "X-Request-ID" + include_in_response: true + {{ template "cors" . }} ---