From 6bbd1c764f3802b8732294c3478f11a1824ff3bb Mon Sep 17 00:00:00 2001 From: danilapog Date: Fri, 29 Jul 2022 12:53:06 +0300 Subject: [PATCH] Add check if jwt env present --- run-document-server.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/run-document-server.sh b/run-document-server.sh index e76ffb8..e4a8279 100755 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -87,12 +87,12 @@ JWT_SECRET=${JWT_SECRET:-secret} JWT_HEADER=${JWT_HEADER:-Authorization} JWT_IN_BODY=${JWT_IN_BODY:-false} -if [ -s ${SECRETS_PATH}/jwt_secret ]; then - JWT_SECRET=$( cat ${SECRETS_PATH}/jwt_secret ) +if [ -n ${JWT_SECRET_FILE} ] || [ -s ${SECRETS_PATH}/jwtSecret ]; then + JWT_SECRET=$( cat ${SECRETS_PATH}/jwtSecret ) fi -if [ -s ${SECRETS_PATH}/jwt_header ]; then - JWT_HEADER=$( cat ${SECRETS_PATH}/jwt_header ) +if [ -n ${JWT_HEADER_FILE} ] || [ -s ${SECRETS_PATH}/jwtHeader ]; then + JWT_HEADER=$( cat ${SECRETS_PATH}/jwtHeader ) fi WOPI_ENABLED=${WOPI_ENABLED:-false}