GrowWithTalha Claude (glm-4.7) commited on
Commit
be75532
·
1 Parent(s): 1c7da91

fix: make frontend_url and jwt_secret optional with defaults

Browse files

- frontend_url defaults to "*" (allow all origins for public API)
- jwt_secret defaults to a placeholder (should be overridden with env var)

This allows the app to start on Hugging Face Spaces without these env vars set.

Co-Authored-By: Claude (glm-4.7) <noreply@anthropic.com>

Files changed (1) hide show
  1. core/config.py +3 -3
core/config.py CHANGED
@@ -18,12 +18,12 @@ class Settings(BaseSettings):
18
  database_url: str
19
 
20
  # JWT
21
- jwt_secret: str
22
  jwt_algorithm: str = "HS256"
23
  jwt_expiration_days: int = 7
24
 
25
- # CORS
26
- frontend_url: str
27
 
28
  # Environment
29
  environment: str = "development"
 
18
  database_url: str
19
 
20
  # JWT
21
+ jwt_secret: str = "change-me-in-production-use-env-var"
22
  jwt_algorithm: str = "HS256"
23
  jwt_expiration_days: int = 7
24
 
25
+ # CORS (optional, defaults to allow all for public API)
26
+ frontend_url: str = "*"
27
 
28
  # Environment
29
  environment: str = "development"