diff --git a/helm/api7ee-demo-k8s/templates/configmap-adc.yaml b/helm/api7ee-demo-k8s/templates/configmap-adc.yaml index 637d5e3..03ade37 100644 --- a/helm/api7ee-demo-k8s/templates/configmap-adc.yaml +++ b/helm/api7ee-demo-k8s/templates/configmap-adc.yaml @@ -92,6 +92,11 @@ data: redirect: http_to_https: true {{- end }} + # Remove /api prefix before forwarding to backend + proxy-rewrite: + regex_uri: + - "^/api/(.*)" + - "/$1" {{- if .Values.api7.plugins.cors.enabled }} cors: allow_origins: {{ .Values.api7.plugins.cors.allowOrigins | join "," | quote }} @@ -120,6 +125,11 @@ data: redirect: http_to_https: true {{- end }} + # Remove /api prefix before forwarding to backend + proxy-rewrite: + regex_uri: + - "^/api/(.*)" + - "/$1" {{- if .Values.api7.plugins.cors.enabled }} cors: allow_origins: {{ .Values.api7.plugins.cors.allowOrigins | join "," | quote }}