mirror of
https://github.com/mempool/mempool.git
synced 2024-11-19 01:41:01 +01:00
expose custom x-total-count header
This commit is contained in:
parent
676abf58fd
commit
b26d26b14c
@ -92,6 +92,7 @@ location @mempool-api-v1-services-cache-disabled-addcors {
|
||||
set $cors_methods 'GET, POST, PUT, DELETE, OPTIONS';
|
||||
set $cors_origin 'https://mempool.space';
|
||||
set $cors_headers 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With';
|
||||
set $cors_expose_headers 'X-Total-Count';
|
||||
set $cors_credentials 'true';
|
||||
|
||||
# set CORS for approved hostnames
|
||||
@ -100,6 +101,7 @@ location @mempool-api-v1-services-cache-disabled-addcors {
|
||||
set $cors_methods 'GET, POST, PUT, DELETE, OPTIONS';
|
||||
set $cors_origin "$http_origin";
|
||||
set $cors_headers 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With';
|
||||
set $cors_expose_headers 'X-Total-Count';
|
||||
set $cors_credentials 'true';
|
||||
}
|
||||
|
||||
@ -108,6 +110,7 @@ location @mempool-api-v1-services-cache-disabled-addcors {
|
||||
add_header Access-Control-Allow-Origin "$cors_origin" always;
|
||||
add_header Access-Control-Allow-Headers "$cors_headers" always;
|
||||
add_header Access-Control-Allow-Credentials "$cors_credentials" always;
|
||||
add_header Access-Control-Expose-Headers "$cors_expose_headers" always;
|
||||
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
@ -172,6 +175,7 @@ location @mempool-api-v1-services-cache-short-addcors {
|
||||
set $cors_methods 'GET, POST, PUT, DELETE, OPTIONS';
|
||||
set $cors_origin 'https://mempool.space';
|
||||
set $cors_headers 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With';
|
||||
set $cors_expose_headers 'X-Total-Count';
|
||||
set $cors_credentials 'true';
|
||||
|
||||
# set CORS for approved hostnames
|
||||
@ -180,6 +184,7 @@ location @mempool-api-v1-services-cache-short-addcors {
|
||||
set $cors_methods 'GET, POST, PUT, DELETE, OPTIONS';
|
||||
set $cors_origin "$http_origin";
|
||||
set $cors_headers 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With';
|
||||
set $cors_expose_headers 'X-Total-Count';
|
||||
set $cors_credentials 'true';
|
||||
}
|
||||
|
||||
@ -188,6 +193,7 @@ location @mempool-api-v1-services-cache-short-addcors {
|
||||
add_header Access-Control-Allow-Origin "$cors_origin" always;
|
||||
add_header Access-Control-Allow-Headers "$cors_headers" always;
|
||||
add_header Access-Control-Allow-Credentials "$cors_credentials" always;
|
||||
add_header Access-Control-Expose-Headers "$cors_expose_headers" always;
|
||||
|
||||
# add our own cache headers
|
||||
add_header 'Pragma' 'public';
|
||||
|
Loading…
Reference in New Issue
Block a user