fix: Forward real client IP through Docker proxy
- Update setupProxy.js to forward X-Real-IP and X-Forwarded-For headers - Improve IP detection in backend middleware to prioritize X-Real-IP - Add debug logging for IP detection in development mode - Update .env.example with clearer IP configuration examples - Enable debug logging in docker-compose.dev.yml This fixes the issue where Docker network IPs (172.20.x.x) were being detected instead of the real client IP addresses. To fix IP restrictions, update your .env file: ALLOWED_IPS=10.30.30.0/24,<your-other-ips> 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+5
-1
@@ -10,7 +10,11 @@ SESSION_TIMEOUT=1800
|
||||
|
||||
# IP Restrictions
|
||||
ENABLE_IP_RESTRICTION=true
|
||||
ALLOWED_IPS=192.168.1.0/24,10.0.0.5,172.16.0.0/16
|
||||
# Add your IP or subnet here. Examples:
|
||||
# - Single IP: 10.30.30.2
|
||||
# - Subnet: 10.30.30.0/24
|
||||
# - Multiple: 10.30.30.2,192.168.1.0/24,172.16.0.0/16
|
||||
ALLOWED_IPS=10.30.30.0/24,192.168.1.0/24,172.16.0.0/16,127.0.0.1
|
||||
|
||||
# MinIO Configuration
|
||||
DEFAULT_MINIO_ALIAS=kopiaminio
|
||||
|
||||
Reference in New Issue
Block a user