From b7fa7c0e0eb2a848cf3fe44940119297f0d92d2d Mon Sep 17 00:00:00 2001 From: Anisio Santos <39890990+anisiosts@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:12:57 -0300 Subject: [PATCH] feat: Add user agent option on api --- src/reait/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/reait/api.py b/src/reait/api.py index be9f977..7a109b2 100755 --- a/src/reait/api.py +++ b/src/reait/api.py @@ -20,6 +20,7 @@ re_conf = { "apikey": environ.get("REAI_API_KEY", ""), "host": environ.get("REAI_API_HOST", "https://api.reveng.ai"), + "user_agent": environ.get("REAI_USER_AGENT", "RevEng.AI Toolkit") } @@ -65,7 +66,7 @@ def reveng_req( :param files: Dictionary of files to send to the specified URL """ url = f"{re_conf['host']}/{end_point if end_point[0] != '/' else end_point[1:]}" - headers = {"Authorization": re_conf["apikey"]} + headers = {"Authorization": re_conf["apikey"], "User-Agent": re_conf["user_agent"]} if ex_headers: headers.update(ex_headers)