Enable CORS for dashboard

This commit is contained in:
2026-07-28 18:29:19 +00:00
parent 5e49b44bca
commit 8fcc265189
5 changed files with 184 additions and 2 deletions
+49
View File
@@ -0,0 +1,49 @@
import requests
import time
from datetime import datetime
URL = "https://ghaymah-sre-api-20e343cababc.hosted.ghaymah.systems/health"
while True:
try:
start = time.time()
response = requests.get(URL)
end = time.time()
response_time = round(end - start, 3)
if response.status_code == 200:
print(
datetime.now(),
"UP",
"Response time:",
response_time,
"seconds"
)
else:
print(
datetime.now(),
"DOWN",
response.status_code
)
except Exception as e:
print(
datetime.now(),
"ERROR",
e
)
time.sleep(30)