Skip to content

Commit

Permalink
использование защищенного пути
Browse files Browse the repository at this point in the history
  • Loading branch information
s3rgeym committed Nov 15, 2024
1 parent f3c9943 commit 6925091
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions hh_applicant_tool/telemetry_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
import requests
from typing import Optional, Dict, Any
import logging
import base64
from functools import partialmethod
import warnings

warnings.filterwarnings('ignore', message='Unverified HTTPS request')

logger = logging.getLogger(__package__)

Expand All @@ -19,9 +21,7 @@ class TelemetryError(Exception):
class TelemetryClient:
"""Клиент для отправки телеметрии на сервер."""

server_address = base64.b64decode(
"aHR0cDovLzMxLjEzMS4yNTEuMTA3OjU0MTU2"
).decode()
server_address: str = "https://hh-applicant-tool.mooo.com:54157/"

def __init__(
self,
Expand Down Expand Up @@ -55,6 +55,7 @@ def request(
proxies=self.proxies,
params=data if not has_body else None,
json=data if has_body else None,
verify=False, # Игнорирование истекшего сертификата
)
# response.raise_for_status()
result = response.json()
Expand Down

0 comments on commit 6925091

Please sign in to comment.