Set all requests to ssl

This commit is contained in:
2025-06-19 19:46:46 +00:00
parent 19f817b796
commit 6653f3cf72
3 changed files with 66 additions and 18 deletions

View File

@@ -17,7 +17,7 @@ from datetime import datetime
print("overview_callbacks.py geladen")
API_BASE_URL = os.getenv("API_BASE_URL", "http://192.168.43.100")
API_BASE_URL = os.getenv("API_BASE_URL", "https://192.168.43.100")
mqtt_thread_started = False
SCREENSHOT_DIR = "received-screenshots"
@@ -40,7 +40,11 @@ def get_latest_screenshot(client_uuid):
def fetch_clients():
try:
resp = requests.get(f"{API_BASE_URL}/api/clients")
verify_ssl = True if ENV == "production" else False
resp = requests.get(
f"{API_BASE_URL}/api/clients",
verify=verify_ssl
)
resp.raise_for_status()
return resp.json()
except Exception as e: