Skip to content

Commit b7fa7c0

Browse files
authored
feat: Add user agent option on api
1 parent 10af1dc commit b7fa7c0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/reait/api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
re_conf = {
2121
"apikey": environ.get("REAI_API_KEY", ""),
2222
"host": environ.get("REAI_API_HOST", "https://api.reveng.ai"),
23+
"user_agent": environ.get("REAI_USER_AGENT", "RevEng.AI Toolkit")
2324
}
2425

2526

@@ -65,7 +66,7 @@ def reveng_req(
6566
:param files: Dictionary of files to send to the specified URL
6667
"""
6768
url = f"{re_conf['host']}/{end_point if end_point[0] != '/' else end_point[1:]}"
68-
headers = {"Authorization": re_conf["apikey"]}
69+
headers = {"Authorization": re_conf["apikey"], "User-Agent": re_conf["user_agent"]}
6970

7071
if ex_headers:
7172
headers.update(ex_headers)

0 commit comments

Comments
 (0)