chore: enable gzip for nginx api responses
This commit is contained in:
@@ -32,6 +32,21 @@ server {
|
||||
listen [::]:80;
|
||||
server_name 51easyai.com;
|
||||
|
||||
# EasyAI response gzip: compress JSON/text API responses; SSE/WebSocket stay uncompressed by content type.
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_min_length 1024;
|
||||
gzip_comp_level 4;
|
||||
gzip_proxied any;
|
||||
gzip_types
|
||||
application/json
|
||||
application/javascript
|
||||
application/xml
|
||||
text/css
|
||||
text/plain
|
||||
text/xml
|
||||
image/svg+xml;
|
||||
|
||||
# ssl 版本控制
|
||||
ssl_protocols TLSv1.2 TLSv1.3; # 只启用 TLS 1.2 和 TLS 1.3
|
||||
# 通用安全头部
|
||||
|
||||
Reference in New Issue
Block a user