- Added consumer/Dockerfile with all dependencies
- Updated consumer pipeline.py to use environment variables
- Updated features.py and decision.py to support env var configuration
- Updated docker-compose.yml to include consumer service
- Consumer now runs automatically with 'docker compose up'
- Proper Kafka and Redis networking for Docker
- Environment variables for ML_MODELS_DIR, KAFKA_BROKER, REDIS_HOST/PORT
Now entire PayGuard system runs with: docker compose up -d
Co-authored-by: Copilot <[email protected]>
The frontend at http://localhost:3000 was getting CORS (Cross-Origin Resource Sharing)
errors when trying to make API requests to http://localhost:8000.
Added CORSMiddleware to FastAPI backend with:
- allow_origins: http://localhost:3000 and http://127.0.0.1:3000
- allow_credentials: true (for Authorization headers)
- allow_methods: all (GET, POST, OPTIONS, etc.)
- allow_headers: all (including Authorization, Content-Type, etc.)
This allows the browser to make cross-origin requests from the frontend to the API.
CORS headers now properly returned:
access-control-allow-origin: http://localhost:3000
access-control-allow-credentials: true
Co-authored-by: Copilot <[email protected]>