Skip to content

Commit dd96e26

Browse files
author
MohammadHosein Bahmani
committed
Set proxy_cache_use_stale with PROXY_CACHE_USE_STALE environment variable
default value for this env variable is 'error timeout http_500 http_502 http_503 http_504'. users can set their desired value for PROXY_CACHE_USE_STALE and configure their s3 gateway.
1 parent e2fbea1 commit dd96e26

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

common/etc/nginx/nginx.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ env PROXY_CACHE_VALID_OK;
3838
env PROXY_CACHE_SLICE_SIZE;
3939
env PROXY_CACHE_VALID_NOTFOUND;
4040
env PROXY_CACHE_VALID_FORBIDDEN;
41+
env PROXY_CACHE_USE_STALE;
4142
env HEADER_PREFIXES_TO_STRIP;
4243
env FOUR_O_FOUR_ON_EMPTY_BUCKET;
4344
env STRIP_LEADING_DIRECTORY_PATH;

common/etc/nginx/templates/default.conf.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ server {
5656
proxy_cache_revalidate on;
5757
proxy_cache_background_update on;
5858
proxy_cache_lock on;
59-
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
59+
proxy_cache_use_stale ${PROXY_CACHE_USE_STALE};
6060
proxy_cache_key "$request_method$host$uri";
6161

6262
# If you need to support proxying range request, refer to this article:

0 commit comments

Comments
 (0)