Alexis Bruneteau 3aa988442f fix: Correct ElGamal public key serialization and .gitignore Python lib paths
- Fix ElGamalEncryption to generate keypair on initialization and provide public_key_bytes property with proper "p:g:h" UTF-8 format
- Add ElGamal alias for backward compatibility with imports
- Improve frontend error handling with detailed base64 decode error messages
- Update .gitignore to specifically ignore backend/lib/ and backend/lib64/ instead of all lib directories, preserving frontend node_modules-style lib/

This fixes the "Invalid public key format" error that was preventing vote submission during testing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 18:19:48 +01:00

12 lines
351 B
TypeScript

/**
* API Configuration
* Determines the backend URL based on environment
*/
export function getBackendUrl(): string {
// In production (Docker), use the backend service name
// In development, use localhost
const isProduction = process.env.NODE_ENV === 'production'
return isProduction ? 'http://backend:8000' : 'http://localhost:8000'
}