CVE Patch + Post stream rubgram + tl improvements

- Switch to using generated columns for rubgram's paid
- Few text changes
- Isolate badges to their type
- Use Redis to cache health checks
- Remove confusing logging and add actionLog stdout logging
- Blacklist RSC/prefetch related requests from nginx logging
- Fix nginx upload size limit
This commit is contained in:
Dreamgineer
2025-12-15 21:15:55 +07:00 Unverified
parent 42ee896468
commit 2c7f18bf56
15 changed files with 187 additions and 118 deletions
+26 -16
View File
@@ -1,29 +1,38 @@
events {}
http {
map $uri $loggable {
default 1;
~^/_next 0;
# 1 = log, 0 = don't log (based on path)
map $uri $loggable_uri {
default 1;
~^/_next 0;
=/favicon.webp 0;
=/robots.txt 0;
~^/api/.*/count$ 0;
}
=/favicon.webp 0;
=/robots.txt 0;
~^/api/.*/count$ 0;
}
# 1 = log, 0 = don't log (based on header)
map $http_rsc $loggable_prefetch {
default 1;
"" 1; # header not present
~.+ 0; # header exists (any value)
}
log_format clean ' $request_method $uri $status';
access_log /var/log/nginx/access.log clean if=$loggable;
# final decision: log only if BOTH say yes
map "$loggable_uri:$loggable_prefetch" $loggable {
default 0;
"1:1" 1;
}
log_format clean ' $request_method $uri $status';
access_log /var/log/nginx/access.log clean if=$loggable;
upstream backend {
# Use the service name defined in docker-compose.yml
server app:3000;
}
server {
listen 80;
# Docker's internal DNS resolver
resolver 127.0.0.11 valid=1s ipv6=off;
resolver 127.0.0.11 valid=5s ipv6=off;
location / {
proxy_pass http://backend;
@@ -32,11 +41,12 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# SSE support if you want it
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_buffering off;
proxy_read_timeout 100s;
proxy_read_timeout 200s;
}
}
client_max_body_size 100M;
}