mirror of
https://framagit.org/framasoft/framaspace/argos.git
synced 2025-04-28 18:02:41 +02:00
💄 — Use a custom User-Agent header
This commit is contained in:
parent
269e551502
commit
2c5420cc9d
2 changed files with 4 additions and 0 deletions
|
@ -2,6 +2,8 @@
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
- 💄 — Use a custom User-Agent header
|
||||
|
||||
## 0.4.0
|
||||
|
||||
Date: 2024-09-04
|
||||
|
|
|
@ -11,6 +11,7 @@ from typing import List
|
|||
import httpx
|
||||
from tenacity import retry, wait_random # type: ignore
|
||||
|
||||
from argos import VERSION
|
||||
from argos.checks import get_registered_check
|
||||
from argos.logging import logger
|
||||
from argos.schemas import AgentResult, SerializableException, Task
|
||||
|
@ -47,6 +48,7 @@ class ArgosAgent:
|
|||
async def run(self):
|
||||
headers = {
|
||||
"Authorization": f"Bearer {self.auth}",
|
||||
"User-Agent": f"Argos Panoptes {VERSION} (about: https://argos-monitoring.framasoft.org/)",
|
||||
}
|
||||
self._http_client = httpx.AsyncClient(headers=headers)
|
||||
logger.info("Running agent against %s", self.server)
|
||||
|
|
Loading…
Reference in a new issue