feat(auth): harden session management and security

- Implement server-side session revocation on logout
- Add IP extraction utility and admin setup error handling
- Improve error codes and response consistency for auth endpoints
- Refine landing page redirect logic to handle transient DB outages
- Update deployment documentation and configuration defaults
This commit is contained in:
Team Dark Devil committed 2026-11-19 20:22:01 +06:00
1 parent 935f12a1e9
commit 89e4d68690
81 files changed
+11530 -6916

No files matched your search

+19 -11
View File
@@ -13,22 +13,18 @@ map $http_x_forwarded_host $forwarded_host {
'' $host;
}
upstream nextjs_upstream {
server web:3000;
}
upstream socketio_upstream {
server ingestion:4000;
}
server {
listen 80;
server_name _;
resolver 127.0.0.11 valid=10s ipv6=off;
set $nextjs_upstream "http://web:3000";
set $socketio_upstream "http://ingestion:4000";
client_max_body_size 50M;
location = /health {
proxy_pass http://socketio_upstream;
proxy_pass $socketio_upstream;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $forwarded_host;
@@ -38,7 +34,7 @@ server {
}
location /socket.io/ {
proxy_pass http://socketio_upstream;
proxy_pass $socketio_upstream;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
@@ -52,8 +48,20 @@ server {
proxy_buffering off;
}
location = /api/export {
proxy_pass $nextjs_upstream;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $forwarded_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 $forwarded_proto;
proxy_buffering off;
proxy_read_timeout 300s;
}
location / {
proxy_pass http://nextjs_upstream;
proxy_pass $nextjs_upstream;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $forwarded_host;