Skip to content

Commit

Permalink
Add option to configure NGINX's trusted proxies (#151)
Browse files Browse the repository at this point in the history
* Add option to configure NGINX's trusted proxies

Closes #150.

Signed-off-by: Julius Rickert <[email protected]>

* Add NGINX's trustedProxies to README

Signed-off-by: Julius Rickert <[email protected]>

* Bump chart version

Signed-off-by: Julius Rickert <[email protected]>

Signed-off-by: Julius Rickert <[email protected]>
  • Loading branch information
juliusrickert authored Nov 3, 2022
1 parent ce0b275 commit 7171278
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion zammad/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: zammad
version: 6.7.1
version: 6.8.0
appVersion: 5.2.1
description: Zammad is a web based open source helpdesk/customer support system with many features to manage customer communication via several channels like telephone, facebook, twitter, chat and e-mails.
home: https://zammad.org
Expand Down
1 change: 1 addition & 0 deletions zammad/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ The following table lists the configurable parameters of the zammad chart and th
| `zammadConfig.memcached.enabled` | Use Memcached dependency | `true` |
| `zammadConfig.memcached.host` | Memcached host | `zammad-memcached` |
| `zammadConfig.memcached.port` | Memcached port | `11211` |
| `zammadConfig.nginx.trustedProxies` | Configure `set_real_ip_from` to trust proxies | `[]` |
| `zammadConfig.nginx.websocketExtraHeaders` | Additional nginx headers for ws location | `[]` |
| `zammadConfig.nginx.extraHeaders` | Additional nginx headers for / location | `[]` |
| `zammadConfig.nginx.knowledgeBaseUrl` | Value of custom URL for knowledge base | `""` |
Expand Down
5 changes: 5 additions & 0 deletions zammad/templates/configmap-nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ data:
client_max_body_size 50M;
{{- /* Trusted proxies */}}
{{ range .Values.zammadConfig.nginx.trustedProxies }}
set_real_ip_from {{ . }};
{{- end }}
{{- if .Values.zammadConfig.nginx.knowledgeBaseUrl }}
{{ if hasPrefix "/" .Values.zammadConfig.nginx.knowledgeBaseUrl }}
rewrite ^{{ .Values.zammadConfig.nginx.knowledgeBaseUrl }}(.*)$ /help$1 last;
Expand Down
1 change: 1 addition & 0 deletions zammad/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ zammadConfig:
host: zammad-memcached
port: 11211
nginx:
trustedProxies: []
extraHeaders: []
# - 'HeaderName "Header Value"'
websocketExtraHeaders: []
Expand Down

0 comments on commit 7171278

Please sign in to comment.