Skip to content

Commit

Permalink
fix: Add and enable websocket on apisix route
Browse files Browse the repository at this point in the history
  • Loading branch information
mineme0110 committed Nov 22, 2023
1 parent 94866a9 commit 5ff0699
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions infrastructure/charts/mediator/templates/apisixroute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,41 @@ spec:

---

apiVersion: apisix.apache.org/v2
kind: ApisixRoute
metadata:
name: mediator-ws-route
namespace: "{{ .Release.Namespace }}"
labels:
{{ template "labels.common" . }}
spec:
http:
- 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" . }}

---

apiVersion: apisix.apache.org/v2
kind: ApisixRoute
metadata:
Expand Down

0 comments on commit 5ff0699

Please sign in to comment.