garvitcpp commited on
Commit
eba9fd4
·
verified ·
1 Parent(s): 46a1205

Update app/core/config.py

Browse files
Files changed (1) hide show
  1. app/core/config.py +8 -8
app/core/config.py CHANGED
@@ -3,20 +3,20 @@ from pydantic_settings import BaseSettings
3
 
4
  class Settings(BaseSettings):
5
  # Database
6
- database_url: str = os.getenv("DATABASE_URL", "sqlite:///./test.db")
7
 
8
- # Security
9
- secret_key: str = os.getenv("SECRET_KEY", "production-secret-key-change-me")
10
- nextjs_secret: str = os.getenv("NEXTJS_SECRET", "qodex-production-secret-2025")
11
  algorithm: str = "HS256"
12
  access_token_expire_minutes: int = 30
13
 
14
- # API Keys
15
- gemini_api_key: str = os.getenv("GEMINI_API_KEY", "")
16
- pinecone_api_key: str = os.getenv("PINECONE_API_KEY", "")
17
 
18
  # Pinecone Configuration
19
- pinecone_index_name: str = os.getenv("PINECONE_INDEX_NAME", "qodex-embeddings")
20
  pinecone_environment: str = os.getenv("PINECONE_ENVIRONMENT", "gcp-starter")
21
 
22
  # App
 
3
 
4
  class Settings(BaseSettings):
5
  # Database
6
+ database_url: str = os.getenv("DATABASE_URL") # ✅ No fallback for production
7
 
8
+ # Security - NO HARDCODED SECRETS!
9
+ secret_key: str = os.getenv("SECRET_KEY") # ✅ Must come from environment
10
+ nextjs_secret: str = os.getenv("NEXTJS_SECRET") # ✅ Must come from environment
11
  algorithm: str = "HS256"
12
  access_token_expire_minutes: int = 30
13
 
14
+ # API Keys - NO HARDCODED KEYS!
15
+ gemini_api_key: str = os.getenv("GEMINI_API_KEY") # ✅ Must come from environment
16
+ pinecone_api_key: str = os.getenv("PINECONE_API_KEY") # ✅ Must come from environment
17
 
18
  # Pinecone Configuration
19
+ pinecone_index_name: str = os.getenv("PINECONE_INDEX_NAME", "qodex") # Only this has safe fallback
20
  pinecone_environment: str = os.getenv("PINECONE_ENVIRONMENT", "gcp-starter")
21
 
22
  # App