Only set OVERWRITEHOST if both host and port are defined (#1233)

This commit is contained in:
Stavros Kois
2023-06-01 23:57:01 +03:00
committed by GitHub
parent 972f98dd61
commit fc86878729
2 changed files with 3 additions and 1 deletions

View File

@@ -4,7 +4,7 @@ description: A file sharing server that puts the control and security of your ow
annotations:
title: Nextcloud
type: application
version: 1.6.28
version: 1.6.29
apiVersion: v2
appVersion: 26.0.2
kubeVersion: '>=1.16.0-0'

View File

@@ -79,7 +79,9 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }}
{{ $envList = mustAppend $envList (dict "name" "NEXTCLOUD_DATA_DIR" "value" .Values.nextcloud.datadir) }}
{{ if eq (include "nginx.certAvailable" .) "true" }}
{{ $envList = mustAppend $envList (dict "name" "APACHE_DISABLE_REWRITE_IP" "value" "1") }}
{{ if and .Values.nextcloud.host .Values.service.nodePort }}
{{ $envList = mustAppend $envList (dict "name" "OVERWRITEHOST" "value" (printf "%v:%v" .Values.nextcloud.host .Values.service.nodePort)) }}
{{ end }}
{{ $envList = mustAppend $envList (dict "name" "OVERWRITEPROTOCOL" "value" "https") }}
{{ $envList = mustAppend $envList (dict "name" "TRUSTED_PROXIES" "value" "127.0.0.1") }}
{{ end }}