Skip to content

Commit

Permalink
Merge pull request #9 from flownative/7-make-cache-lifetime-for-stati…
Browse files Browse the repository at this point in the history
…c-files-configurable

Cache lifetime tweaks
  • Loading branch information
robertlemke authored May 5, 2022
2 parents 682db40 + aeb16a1 commit a526f64
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion root-files/opt/flownative/lib/nginx-legacy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ EOM
# pass persistent resource requests to GCS
location ~* "^${BEACH_PERSISTENT_RESOURCES_BASE_PATH}([a-f0-9]{40})/" {
resolver 8.8.8.8;
expires ${NGINX_STATIC_FILES_LIFETIME};
proxy_set_header Authorization "";
add_header Via 'Beach Asset Proxy';
add_header Cache-Control 'public, max-age=${NGINX_STATIC_FILES_LIFETIME}';
${addHeaderStrictTransportSecurity}
proxy_pass http://storage.googleapis.com/${BEACH_GOOGLE_CLOUD_STORAGE_PUBLIC_BUCKET}/\$1\$is_args\$args;
}
Expand Down
2 changes: 1 addition & 1 deletion root-files/opt/flownative/lib/nginx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export NGINX_CACHE_BACKGROUND_UPDATE="${NGINX_CACHE_BACKGROUND_UPDATE:-off}"
export NGINX_CUSTOM_ERROR_PAGE_CODES="${NGINX_CUSTOM_ERROR_PAGE_CODES:-500 501 502 503}"
export NGINX_CUSTOM_ERROR_PAGE_TARGET="${NGINX_CUSTOM_ERROR_PAGE_TARGET:-}"
export NGINX_STATIC_FILES_LIFETIME=${NGINX_STATIC_FILES_LIFETIME:-30d}
export NGINX_STATIC_FILES_LIFETIME=${NGINX_STATIC_FILES_LIFETIME:-6M}
export PATH="${PATH}:${NGINX_BASE_PATH}/bin"
EOF
Expand Down

0 comments on commit a526f64

Please sign in to comment.