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:
1 parent
935f12a1e9
commit
89e4d68690
81 files changed
+11530
-6916
No files matched your search
+19
-11
@@ -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;
|
||||
|
||||
@@ -25,6 +25,7 @@ services:
|
||||
redis:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
stop_grace_period: 20s
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
@@ -54,12 +55,14 @@ services:
|
||||
DATASTACK_INTERNAL_SECRET: "${DATASTACK_INTERNAL_SECRET:-${SERVICE_REALBASE64_64_INTERNAL:-}}"
|
||||
DATABASE_URL: "postgresql://datastack:${SERVICE_PASSWORD_64_POSTGRES:?Coolify must generate SERVICE_PASSWORD_64_POSTGRES}@postgres:5432/${SERVICE_HEX_32_DATABASENAME:?Coolify must generate SERVICE_HEX_32_DATABASENAME}"
|
||||
REDIS_URL: "redis://redis:6379"
|
||||
DATASTACK_CORS_ORIGINS: "${DATASTACK_CORS_ORIGINS:-}"
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
stop_grace_period: 20s
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
|
||||
Reference in new issue
Block a user