ngclinflows commented on code in PR #904:
URL: https://github.com/apache/apisix-helm-chart/pull/904#discussion_r2564013041
##########
charts/apisix/values.yaml:
##########
@@ -418,6 +418,9 @@ apisix:
enableCPUAffinity: true
# -- Timeout during which a keep-alive client connection will stay open on
the server side.
keepaliveTimeout: 60s
+ # -- The name of the header from which to extract the real client IP
address
+ # http://nginx.org/en/docs/http/ngx_http_realip_module.html#real_ip_header
+ realIpHeader: "X-Real-IP"
envs: []
Review Comment:
```suggestion
# -- Defines trusted addresses that are known to send correct
replacement addresses.
#
http://nginx.org/en/docs/http/ngx_http_realip_module.html#set_real_ip_from
realIpFrom:
- 127.0.0.1
- 'unix:'
envs: []
```
##########
charts/apisix/templates/configmap.yaml:
##########
@@ -202,7 +202,7 @@ data:
client_body_timeout: 60s # timeout for reading client request
body, then 408 (Request Time-out) error is returned to the client
send_timeout: 10s # timeout for transmitting a response
to the client.then the connection is closed
underscores_in_headers: "on" # default enables the use of
underscores in client request header fields
- real_ip_header: "X-Real-IP" #
http://nginx.org/en/docs/http/ngx_http_realip_module.html#real_ip_header
+ real_ip_header: {{ .Values.apisix.nginx.realIpHeader | quote }} #
http://nginx.org/en/docs/http/ngx_http_realip_module.html#real_ip_header
real_ip_from: #
http://nginx.org/en/docs/http/ngx_http_realip_module.html#set_real_ip_from
- 127.0.0.1
- 'unix:'
Review Comment:
```suggestion
real_ip_from: #
http://nginx.org/en/docs/http/ngx_http_realip_module.html#set_real_ip_from
{{- if .Values.apisix.nginx.realIpFrom }}
{{- toYaml .Values.apisix.nginx.realIpFrom | nindent 10 }}
{{- else }}
- 127.0.0.1
- 'unix:'
{{- end }}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]