Fix CORS plugin configuration for API7 Enterprise
Changed CORS plugin array values to comma-separated strings: - allow_origins: from JSON array to comma-separated string - allow_methods: from JSON array to comma-separated string - allow_headers: from JSON array to comma-separated string - expose_headers: from JSON array to comma-separated string API7 Enterprise expects string values with comma-separated items, not JSON arrays. This fixes the validation error: "Invalid type. Expected: string, given: array" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -38,10 +38,10 @@ data:
|
||||
{{- end }}
|
||||
{{- if .Values.api7.plugins.cors.enabled }}
|
||||
cors:
|
||||
allow_origins: {{ .Values.api7.plugins.cors.allowOrigins | toJson }}
|
||||
allow_methods: {{ .Values.api7.plugins.cors.allowMethods | toJson }}
|
||||
allow_headers: {{ .Values.api7.plugins.cors.allowHeaders | toJson }}
|
||||
expose_headers: {{ .Values.api7.plugins.cors.exposeHeaders | toJson }}
|
||||
allow_origins: {{ .Values.api7.plugins.cors.allowOrigins | join "," | quote }}
|
||||
allow_methods: {{ .Values.api7.plugins.cors.allowMethods | join "," | quote }}
|
||||
allow_headers: {{ .Values.api7.plugins.cors.allowHeaders | join "," | quote }}
|
||||
expose_headers: {{ .Values.api7.plugins.cors.exposeHeaders | join "," | quote }}
|
||||
max_age: {{ .Values.api7.plugins.cors.maxAge }}
|
||||
allow_credential: {{ .Values.api7.plugins.cors.allowCredentials }}
|
||||
{{- end }}
|
||||
@@ -72,10 +72,10 @@ data:
|
||||
{{- end }}
|
||||
{{- if .Values.api7.plugins.cors.enabled }}
|
||||
cors:
|
||||
allow_origins: {{ .Values.api7.plugins.cors.allowOrigins | toJson }}
|
||||
allow_methods: {{ .Values.api7.plugins.cors.allowMethods | toJson }}
|
||||
allow_headers: {{ .Values.api7.plugins.cors.allowHeaders | toJson }}
|
||||
expose_headers: {{ .Values.api7.plugins.cors.exposeHeaders | toJson }}
|
||||
allow_origins: {{ .Values.api7.plugins.cors.allowOrigins | join "," | quote }}
|
||||
allow_methods: {{ .Values.api7.plugins.cors.allowMethods | join "," | quote }}
|
||||
allow_headers: {{ .Values.api7.plugins.cors.allowHeaders | join "," | quote }}
|
||||
expose_headers: {{ .Values.api7.plugins.cors.exposeHeaders | join "," | quote }}
|
||||
max_age: {{ .Values.api7.plugins.cors.maxAge }}
|
||||
allow_credential: {{ .Values.api7.plugins.cors.allowCredentials }}
|
||||
{{- end }}
|
||||
@@ -100,10 +100,10 @@ data:
|
||||
{{- end }}
|
||||
{{- if .Values.api7.plugins.cors.enabled }}
|
||||
cors:
|
||||
allow_origins: {{ .Values.api7.plugins.cors.allowOrigins | toJson }}
|
||||
allow_methods: {{ .Values.api7.plugins.cors.allowMethods | toJson }}
|
||||
allow_headers: {{ .Values.api7.plugins.cors.allowHeaders | toJson }}
|
||||
expose_headers: {{ .Values.api7.plugins.cors.exposeHeaders | toJson }}
|
||||
allow_origins: {{ .Values.api7.plugins.cors.allowOrigins | join "," | quote }}
|
||||
allow_methods: {{ .Values.api7.plugins.cors.allowMethods | join "," | quote }}
|
||||
allow_headers: {{ .Values.api7.plugins.cors.allowHeaders | join "," | quote }}
|
||||
expose_headers: {{ .Values.api7.plugins.cors.exposeHeaders | join "," | quote }}
|
||||
max_age: {{ .Values.api7.plugins.cors.maxAge }}
|
||||
allow_credential: {{ .Values.api7.plugins.cors.allowCredentials }}
|
||||
{{- end }}
|
||||
|
||||
Reference in New Issue
Block a user