perf: cache media and coalesce realtime sync

This commit is contained in:
winchen
2026-08-03 10:14:02 +08:00
parent b492a5ff76
commit e42bd6a225
9 changed files with 187 additions and 47 deletions
+11
View File
@@ -6,6 +6,10 @@ server {
root /var/www/im-web;
index index.html;
client_max_body_size 100m;
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_types application/json;
location = / {
try_files /index.html =404;
@@ -18,6 +22,13 @@ server {
add_header Cache-Control "no-store";
}
location = /api/media_proxy.php {
include snippets/fastcgi-php.conf;
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/var/www/im-web/:/tmp/";
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
fastcgi_read_timeout 300;
}
location ~ ^/api/.+\.php$ {
include snippets/fastcgi-php.conf;
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/var/www/im-web/:/tmp/";