Skip to content

Commit c2b82a9

Browse files
mhbahmanidekobon
authored andcommitted
Add not-blank-validation for PROXY_CACHE_USE_STALE variable
1 parent a7dd404 commit c2b82a9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

common/docker-entrypoint.d/00-check-for-required-env.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ failed=0
2424

2525
required=("S3_BUCKET_NAME" "S3_SERVER" "S3_SERVER_PORT" "S3_SERVER_PROTO"
2626
"S3_REGION" "S3_STYLE" "ALLOW_DIRECTORY_LIST" "AWS_SIGS_VERSION"
27-
"CORS_ENABLED")
27+
"CORS_ENABLED", "PROXY_CACHE_USE_STALE")
2828

2929
# Require some form of authentication to be configured.
3030

@@ -126,6 +126,10 @@ if [ -n "${HEADER_PREFIXES_TO_STRIP+x}" ]; then
126126
fi
127127
fi
128128

129+
if [[ ! "${PROXY_CACHE_USE_STALE}" ]]; then
130+
>&2 echo "PROXY_CACHE_USE_STALE must not be blank"
131+
failed=1
132+
fi
129133

130134
if [ $failed -gt 0 ]; then
131135
exit 1

0 commit comments

Comments
 (0)