Rulga commited on
Commit
7827bc1
·
1 Parent(s): 3a65c07

Add Authorization header to API configuration for improved security

Browse files
Files changed (1) hide show
  1. config/settings.py +3 -2
config/settings.py CHANGED
@@ -9,11 +9,12 @@ if not HF_TOKEN:
9
  API_CONFIG = {
10
  "inference_endpoint": os.getenv("HF_INFERENCE_ENDPOINT", "https://api-inference.huggingface.co"),
11
  "token": HF_TOKEN,
12
- "is_paid_tier": True, # или False в зависимости от вашего плана
13
  "timeout": 30,
14
  "headers": {
15
  "X-Use-Cache": "false",
16
- "Content-Type": "application/json"
 
17
  }
18
  }
19
 
 
9
  API_CONFIG = {
10
  "inference_endpoint": os.getenv("HF_INFERENCE_ENDPOINT", "https://api-inference.huggingface.co"),
11
  "token": HF_TOKEN,
12
+ "is_paid_tier": True,
13
  "timeout": 30,
14
  "headers": {
15
  "X-Use-Cache": "false",
16
+ "Content-Type": "application/json",
17
+ "Authorization": f"Bearer {HF_TOKEN}" # явно указываем авторизацию
18
  }
19
  }
20