Files
asepharyana-hub/infra/traefik/dynamic/middlewares.yaml
T
Asep Haryana b96548bffa fix(infra): raise upload-buffer response cap to 2GB
Chunked file streaming (TeleUploader) serves multi-part bodies up to
120MB+; 10MB maxResponseBodyBytes made every big download 500.
2026-08-01 12:52:34 +07:00

101 lines
2.4 KiB
YAML

http:
middlewares:
secure-headers:
headers:
sslRedirect: true
forceSTSHeader: true
stsSeconds: 31536000
stsIncludeSubdomains: true
stsPreload: true
frameDeny: true
contentTypeNosniff: true
browserXSSFilter: true
referrerPolicy: 'same-origin'
customResponseHeaders:
X-Content-Type-Options: 'nosniff'
X-Frame-Options: 'DENY'
X-XSS-Protection: '1; mode=block'
Referrer-Policy: 'same-origin'
Permissions-Policy: 'geolocation=(), microphone=(), camera=()'
compress:
compress:
minResponseBodyBytes: 256
excludedContentTypes:
- 'image/*'
- 'application/octet-stream'
retry:
retry:
attempts: 3
rate-limit:
rateLimit:
average: 100
burst: 50
buffer:
buffering:
maxRequestBodyBytes: 10485760
maxResponseBodyBytes: 10485760
memRequestBodyBytes: 1048576
memResponseBodyBytes: 1048576
admin-chain:
chain:
middlewares:
- secure-headers
- compress
- retry
# ── Useful Plugins ──
real-ip:
plugin:
real-ip:
excludednetworks:
- '127.0.0.1/32'
realipheader: 'CF-Connecting-IP'
block-sensitive-paths:
plugin:
blockpath:
regex:
- "^/\\.env"
- "^/\\.git"
- '^/wp-admin'
- "^/wp-login\\.php"
- "^/config\\.php"
# ── LLM Stream Chain (no buffer/compress — SSE needs real-time) ──
llm-chain:
chain:
middlewares:
- secure-headers
- retry
- rate-limit
# ── Common Chain ──
common-chain:
chain:
middlewares:
- secure-headers
- compress
- retry
- rate-limit
- buffer
# ── TeleUploader Chain (2GB body buffer — large file uploads) ──
upload-buffer:
buffering:
maxRequestBodyBytes: 2147483648
maxResponseBodyBytes: 2147483648
memRequestBodyBytes: 1048576
memResponseBodyBytes: 1048576
upload-rate-limit:
rateLimit:
average: 300
burst: 100
period: 1m
upload-chain:
chain:
middlewares:
- secure-headers
- retry
- upload-rate-limit
- upload-buffer