[ops] Fix prod nginx perma-cache URL patterns

Currently we perma-cache everything matching /api/block, but this
is bad because it also matches /api/block-height and /api/blocks/
API endpoints, which shouldn't be perma-cached. Add a trailing slash
to prevent those from getting matched.
This commit is contained in:
wiz 2022-06-24 17:52:34 +09:00
parent ecefddf2c3
commit c5e0b0fc74
No known key found for this signature in database
GPG Key ID: A394E332255A6173

View File

@ -4,13 +4,13 @@ location /api/v1/statistics {
location /api/v1/mining {
try_files /dev/null @mempool-api-v1-warmcache;
}
location /api/v1/block {
location /api/v1/block/ {
try_files /dev/null @mempool-api-v1-forevercache;
}
location /api/v1 {
try_files /dev/null @mempool-api-v1-coldcache;
}
location /api/block {
location /api/block/ {
rewrite ^/api/(.*) /$1 break;
try_files /dev/null @electrs-api-forevercache;
}