mirror of
https://github.com/mempool/mempool.git
synced 2025-01-18 05:12:35 +01:00
Enable nginx reverse proxy cache for sponsor profile images + misc tweaks
This commit is contained in:
parent
203374bce2
commit
b89a549a75
@ -54,6 +54,9 @@ http {
|
||||
# limit request body size
|
||||
client_max_body_size 10m;
|
||||
|
||||
# proxy cache
|
||||
proxy_cache_path /var/cache/nginx keys_zone=cache:20m levels=1:2 inactive=600s max_size=500m;
|
||||
|
||||
# rate limit requests
|
||||
limit_req_zone $binary_remote_addr zone=api:5m rate=50r/m;
|
||||
limit_req_zone $binary_remote_addr zone=electrs:5m rate=1000r/m;
|
||||
@ -104,6 +107,7 @@ http {
|
||||
add_header Content-Security-Policy $contentSecurityPolicy;
|
||||
add_header Link "<https://mempool.space$request_uri>; rel=\"canonical\"";
|
||||
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";
|
||||
#add_header Onion-Location http://mempoolhqx4isw62xs7abwphsq7ldayuidyx2v2oethdhhj6mlo2r6ad.onion$request_uri;
|
||||
|
||||
# /
|
||||
|
||||
@ -111,6 +115,16 @@ http {
|
||||
try_files $uri $uri/ /index.html =404;
|
||||
}
|
||||
|
||||
# # /sitemap
|
||||
# location /sitemap {
|
||||
# try_files $uri =410;
|
||||
# }
|
||||
#
|
||||
# # /explorer
|
||||
# location /explorer {
|
||||
# rewrite /explorer/(.*) https://$host/$1 permanent;
|
||||
# }
|
||||
|
||||
# /api
|
||||
|
||||
location = /api {
|
||||
@ -120,8 +134,10 @@ http {
|
||||
try_files $uri $uri/ /index.html =404;
|
||||
}
|
||||
location /api/v1/donations {
|
||||
proxy_pass http://127.0.0.1:8999;
|
||||
# don't rate limit this URL prefix
|
||||
proxy_pass http://127.0.0.1:8999;
|
||||
proxy_cache cache;
|
||||
proxy_cache_valid 200 1d;
|
||||
}
|
||||
location /api/v1/ws {
|
||||
proxy_pass http://127.0.0.1:8999/;
|
||||
@ -224,7 +240,6 @@ http {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
limit_conn websocket 10;
|
||||
}
|
||||
location /bisq/api/v1/markets {
|
||||
proxy_pass http://127.0.0.1:8996/api/v1/bisq/markets;
|
||||
@ -236,7 +251,7 @@ http {
|
||||
}
|
||||
location /bisq/api {
|
||||
proxy_pass http://127.0.0.1:8996/api/v1/bisq;
|
||||
limit_req burst=100 nodelay zone=electrs;
|
||||
limit_req burst=50 nodelay zone=api;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user