Skip to content

Commit

Permalink
Revert "add helper template to construct trustedDomains list"
Browse files Browse the repository at this point in the history
This reverts commit ef658af.
  • Loading branch information
xoxys committed Oct 25, 2022
1 parent ef658af commit fc80bf3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 19 deletions.
2 changes: 1 addition & 1 deletion charts/owncloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an
| owncloud.tokenAuthEnforced | string | `""` | Enforce token only authentication for apps and clients connecting to ownCloud (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_sample_php_parameters.html#enforce-token-only-authentication-for-apps-and-clients-connecting-to-owncloud)). |
| owncloud.trashbin.purgeLimit | string | `""` | Define the trashbin purge limit (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_sample_php_parameters.html#define-the-trashbin-purge-limit)). |
| owncloud.trashbin.retentionObligation | string | `""` | Define the trashbin retention obligation (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_sample_php_parameters.html#define-the-trashbin-retention-obligation)). |
| owncloud.trustedDomains | list | `["localhost"]` | List of trusted domains to prevent host header poisoning (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_sample_php_parameters.html#define-list-of-trusted-domains-that-users-can-log-into)). The value from `{{ .Values.owncloud.overwriteCliUrl }}` is added to the list automatically. |
| owncloud.trustedDomains | string | `"localhost"` | List of trusted domains to prevent host header poisoning (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_sample_php_parameters.html#define-list-of-trusted-domains-that-users-can-log-into)). |
| owncloud.trustedProxies | string | `""` | Define list of trusted proxy servers (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_sample_php_parameters.html#define-list-of-trusted-proxy-servers)). |
| owncloud.updateChecker | string | `""` | Enable or disable updatechecker (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_sample_php_parameters.html#enable-or-disable-updatechecker)). |
| owncloud.updaterServerUrl | string | `""` | Define the updatechecker URL (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_sample_php_parameters.html#define-the-updatechecker-url)). |
Expand Down
14 changes: 0 additions & 14 deletions charts/owncloud/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,6 @@ Create chart name and version as used by the chart label.
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
ownCloud trusted domains list.
*/}}
{{- define "owncloud.trustedDomains" -}}
{{- $domains := list -}}
{{- with .Values.owncloud.domain -}}
{{- $domains = append $domains . -}}
{{- end -}}
{{- with .Values.owncloud.trustedDomains -}}
{{- $domains = concat $domains . -}}
{{- end -}}
{{- $domains | join "," }}
{{- end }}

{{/*
Common labels
*/}}
Expand Down
2 changes: 1 addition & 1 deletion charts/owncloud/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ spec:
- name: OWNCLOUD_DOMAIN
value: {{ .Values.owncloud.domain | quote }}
- name: OWNCLOUD_TRUSTED_DOMAINS
value: {{ include "owncloud.trustedDomains" . }}
value: {{ .Values.owncloud.trustedDomains | quote }}
- name: OWNCLOUD_ENABLED_PREVIEW_PROVIDERS
value: {{ .Values.owncloud.enabledPreviewProviders | quote }}
- name: OWNCLOUD_ENABLE_AVATARS
Expand Down
5 changes: 2 additions & 3 deletions charts/owncloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,8 @@ owncloud:
defaultLanguage: "en"
# -- Base domain used in `{{ .Values.owncloud.overwriteCliUrl }}` by default.
domain: "owncloud.chart.example"
# -- List of trusted domains to prevent host header poisoning (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_sample_php_parameters.html#define-list-of-trusted-domains-that-users-can-log-into)). The value from `{{ .Values.owncloud.overwriteCliUrl }}` is added to the list automatically.
trustedDomains:
- "localhost"
# -- List of trusted domains to prevent host header poisoning (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_sample_php_parameters.html#define-list-of-trusted-domains-that-users-can-log-into)).
trustedDomains: "localhost"
# -- Define preview providers (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_sample_php_parameters.html#define-preview-providers)).
enabledPreviewProviders: ""
# -- Enable or disable avatars or user profile photos (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_sample_php_parameters.html#enable-or-disable-avatars-or-user-profile-photos)).
Expand Down

0 comments on commit fc80bf3

Please sign in to comment.