Skip to content

Commit

Permalink
geoserver: support CORS (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
camuffo authored Jun 20, 2024
1 parent fe46ac2 commit c1b3852
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
20 changes: 20 additions & 0 deletions geoserver/latest/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,26 @@ spec:
\ -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$(GEOSERVER_HEAP_DUMP_DIR)/$(POD_HOSTNAME).hprof -DGEOSERVER_DATA_DIR=$(GEOSERVER_DATA_DIR)\"
\ -DGEOSERVER_AUDIT_PATH=$\"(GEOSERVER_AUDIT_PATH)\" -Dpod.hostname=\"$(POD_HOSTNAME)\"
\ -DALLOW_ENV_PARAMETRIZATION=true -DPROXY_BASE_URL='$(PROXY_BASE_URL)'"
{{- if .Values.geoserver.geoserver_cors_enabled }}
- name: CORS_ENABLED
value: "{{ .Values.geoserver.geoserver_cors_enabled }}"
{{- end }}
{{- if .Values.geoserver.geoserver_cors_allowed_methods }}
- name: CORS_ALLOWED_METHODS
value: "{{ .Values.geoserver.geoserver_cors_allowed_methods }}"
{{- end }}
{{- if .Values.geoserver.geoserver_cors_allowed_origins }}
- name: CORS_ALLOWED_ORIGINS
value: "{{ .Values.geoserver.geoserver_cors_allowed_origins }}"
{{- end }}
{{- if .Values.geoserver.geoserver_cors_allowed_headers }}
- name: CORS_ALLOWED_HEADERS
value: "{{ .Values.geoserver.geoserver_cors_allowed_headers }}"
{{- end }}
{{- if .Values.geoserver.geoserver_cors_allow_credentials }}
- name: CORS_ALLOW_CREDENTIALS
value: "{{ .Values.geoserver.geoserver_cors_allow_credentials }}"
{{- end }}
ports:
- name: http
containerPort: 8080
Expand Down
5 changes: 5 additions & 0 deletions geoserver/latest/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,8 @@ geoserver:
geoserver_jai_ext_enabled: "true"
geoserver_java_mem_xms: "4G"
geoserver_java_mem_xmx: "4G"
geoserver_cors_enabled: "false"
geoserver_cors_allowed_methods: "GET,POST,PUT,HEAD,OPTIONS"
geoserver_cors_allowed_origins: "*"
geoserver_cors_allowed_headers: "*"
geoserver_cors_allow_credentials: "false"

0 comments on commit c1b3852

Please sign in to comment.