interplane-forge
INTERPLANE Forge
Brought by drakestapleton
Comparing 3df50b9554ac999c45c6eaea50884e11e257bc45 ... 539217d2e4a67ec266b6d88ab2f3dc882f929f46
3 files changed, +10 -1
| infra/nginx/conf.d/forge.conf | +8 | -0 |
| infra/nginx/snippets/forge-archive.conf | +0 | -1 |
| infra/nginx/snippets/forge-proxy.conf | +2 | -0 |
infra/nginx/conf.d/forge.conf
| @@ -106,3 +106,11 @@ map $http_accept $forge_json { | ||
| 106 | 106 | "~text/html" 0; |
| 107 | 107 | "~application/json" 1; |
| 108 | 108 | } |
| 109 | + | |
| 110 | +# Historical Git mirror pages share the single forged listener with Explore and repo homes. | |
| 111 | +# Count commit-addressed reads across clients. Empty keys leave other requests unaffected. | |
| 112 | +map "$request_method:$uri" $forge_git_history_key { | |
| 113 | + default ""; | |
| 114 | + "~^(?:GET|HEAD):/(?:forge/)?drakestapleton/git/(?:blob|tree|raw|blame|commits?)/[0-9a-f]{40}(?:/|$)" "git-history"; | |
| 115 | +} | |
| 116 | +limit_conn_zone $forge_git_history_key zone=forge_git_history:1m; |
infra/nginx/snippets/forge-archive.conf
| @@ -8,4 +8,3 @@ proxy_read_timeout 300s; | ||
| 8 | 8 | gzip off; |
| 9 | 9 | limit_conn forge_dl 2; |
| 10 | 10 | limit_conn forge_dl_all 6; |
| 11 | -limit_conn_status 429; |
infra/nginx/snippets/forge-proxy.conf
| @@ -10,6 +10,8 @@ limit_req zone=forge_other_reads burst=30 nodelay; | ||
| 10 | 10 | limit_req zone=forge_source_pages burst=128 delay=8; |
| 11 | 11 | limit_req zone=forge_bots burst=10; |
| 12 | 12 | limit_req_status 429; |
| 13 | +limit_conn forge_git_history 3; | |
| 14 | +limit_conn_status 429; | |
| 13 | 15 | |
| 14 | 16 | # Body size: client_max_body_size is the including server block's (64k on interplane.io), so the |
| 15 | 17 | # one location that takes larger bodies (the git patch upload, 3145728 bytes) can raise it; set |