"feat: Integrate new API for user authentication in backend"

This commit is contained in:
2025-05-26 07:16:08 +02:00
parent ebaef3a9b5
commit 3b53e78799
2 changed files with 41 additions and 24 deletions

View File

@@ -27,7 +27,8 @@ LOG_DATE_FORMAT = "%Y-%m-%d %H:%M:%S"
# Flask-Konfiguration
FLASK_HOST = "0.0.0.0"
FLASK_PORT = 5000
FLASK_PORT = 443
FLASK_FALLBACK_PORT = 80
FLASK_DEBUG = True
SESSION_LIFETIME = timedelta(days=7)
@@ -35,6 +36,7 @@ SESSION_LIFETIME = timedelta(days=7)
SSL_ENABLED = True
SSL_CERT_PATH = "/opt/myp/ssl/myp.crt"
SSL_KEY_PATH = "/opt/myp/ssl/myp.key"
SSL_HOSTNAME = "raaspberry"
# Scheduler-Konfiguration
SCHEDULER_INTERVAL = 60 # Sekunden
@@ -102,8 +104,8 @@ def get_ssl_context():
if os.path.exists(script_path):
os.system(f"chmod +x {script_path}")
# Zertifikate erstellen
os.system(f"{script_path} -c {SSL_CERT_PATH} -k {SSL_KEY_PATH}")
# Zertifikate erstellen mit spezifischem Hostnamen
os.system(f"{script_path} -c {SSL_CERT_PATH} -k {SSL_KEY_PATH} -h {SSL_HOSTNAME}")
else:
print(f"WARNUNG: SSL-Zertifikat-Generator nicht gefunden: {script_path}")
return None