This commit is contained in:
2026-02-01 21:06:19 +01:00
parent 143706d856
commit 08365d9997
2 changed files with 192 additions and 218 deletions
+10 -1
View File
@@ -24,9 +24,19 @@ data:
import requests
from bs4 import BeautifulSoup
from fastapi import FastAPI, Response
from fastapi.middleware.cors import CORSMiddleware
from prometheus_client import Counter, Histogram, Gauge, generate_latest, CONTENT_TYPE_LATEST
APP = FastAPI()
# Add CORS middleware to allow cross-origin requests from Glance dashboards
APP.add_middleware(
CORSMiddleware,
allow_origins=["https://kisfenyo.dooplex.hu", "https://orsi.dooplex.hu", "https://glance-helper.dooplex.hu"],
allow_credentials=True,
allow_methods=["GET", "POST", "PUT", "DELETE", "OPTIONS"],
allow_headers=["*"],
)
# ================================
# Időkép configuration
@@ -1246,7 +1256,6 @@ data:
}, ensure_ascii=False),
media_type="application/json; charset=utf-8"
)
---
apiVersion: apps/v1
kind: Deployment