48037f03fd
openobserve上报 --------- Co-authored-by: guke <guke@autohome.com.cn> Reviewed-on: #145
38 lines
1.3 KiB
Plaintext
38 lines
1.3 KiB
Plaintext
# 80 → 301 → 443
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name app-api.shaguabijia.com;
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
# 443 SSL 反代到本地 uvicorn (127.0.0.1:8770)
|
|
server {
|
|
listen 443 ssl http2;
|
|
listen [::]:443 ssl http2;
|
|
server_name app-api.shaguabijia.com;
|
|
|
|
ssl_certificate /etc/nginx/ssl/app-api.shaguabijia.com.pem;
|
|
ssl_certificate_key /etc/nginx/ssl/app-api.shaguabijia.com.key;
|
|
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_ciphers HIGH:!aNULL:!MD5;
|
|
ssl_session_cache shared:SSL:10m;
|
|
|
|
# 上传接口(反馈/上报截图、头像)业务上限 = 最多 6 张 × 每张 5MB
|
|
# (见 app _MAX_IMAGES / AVATAR_MAX_BYTES)≈ 30MB,留余量设 32m。
|
|
# 低于此值时带截图的反馈会在到达 uvicorn 前就被 nginx 413,表现为「提交经常失败」
|
|
# (纯文字反馈体积小、不受影响 → 呈现为「时好时坏」)。根治仍需客户端上传前压缩。
|
|
client_max_body_size 32m;
|
|
|
|
location / {
|
|
proxy_pass http://127.0.0.1:8770;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_read_timeout 30s;
|
|
}
|
|
}
|