Backend Fixes:
- Admin deletions now create deletion_log entries (admin_moderation_deletion)
- Static mount for /previews added to serve preview images
- Admin groups endpoint supports consent filter parameter
Frontend Improvements:
- Replaced consent dropdown with checkbox UI (Workshop, Facebook, Instagram, TikTok)
- Checkboxes use OR logic for filtering
- Revoked consents excluded from filter counts
- Updated ModerationGroupsPage to send consents array to backend
Infrastructure:
- Simplified nginx.conf (proxy /api/* to backend, all else to frontend)
- Fixed docker-compose port mapping (5001:5000)
Tests: 11/11 passed ✅
70 lines
2.3 KiB
Nginx Configuration File
70 lines
2.3 KiB
Nginx Configuration File
server {
|
|
listen 80;
|
|
|
|
# Allow large uploads (100MB for batch uploads)
|
|
client_max_body_size 100M;
|
|
|
|
# ========================================
|
|
# Backend API Routes (all under /api/)
|
|
# ========================================
|
|
# Basierend auf routeMappings.js:
|
|
# - /api/upload, /api/download, /api/groups (Public API)
|
|
# - /api/manage/* (Management Portal, Token-basiert)
|
|
# - /api/admin/* (Admin/Moderation, Bearer Token)
|
|
# - /api/system/migration/* (System API)
|
|
|
|
location /api/ {
|
|
proxy_pass http://backend-dev:5000;
|
|
proxy_set_header Host $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 $scheme;
|
|
|
|
# Large uploads für Batch-Upload
|
|
client_max_body_size 100M;
|
|
}
|
|
|
|
# ========================================
|
|
# Frontend Routes (React Dev Server)
|
|
# ========================================
|
|
|
|
# Protected route - Moderation (HTTP Basic Auth)
|
|
location /moderation {
|
|
auth_basic "Restricted Area - Moderation";
|
|
auth_basic_user_file /etc/nginx/.htpasswd;
|
|
|
|
proxy_pass http://127.0.0.1:3000;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "Upgrade";
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
|
|
# WebSocket support for React Hot Reloading
|
|
location /ws {
|
|
proxy_pass http://127.0.0.1:3000;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "Upgrade";
|
|
proxy_set_header Host $host;
|
|
}
|
|
|
|
# All other routes → React Dev Server (Client-side routing)
|
|
location / {
|
|
proxy_pass http://127.0.0.1:3000;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "Upgrade";
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = /50x.html {
|
|
root /usr/share/nginx/html;
|
|
}
|
|
}
|