Update flask_server.py

This commit is contained in:
MacRimi
2025-11-04 11:03:09 +01:00
parent 37f6cd96a4
commit 5669ce207c

View File

@@ -28,6 +28,9 @@ import jwt
from functools import wraps from functools import wraps
from pathlib import Path from pathlib import Path
app = Flask(__name__)
CORS(app) # Enable CORS for Next.js frontend
# Authentication configuration # Authentication configuration
AUTH_CONFIG_DIR = Path.home() / ".config" / "proxmenux-monitor" AUTH_CONFIG_DIR = Path.home() / ".config" / "proxmenux-monitor"
AUTH_CONFIG_FILE = AUTH_CONFIG_DIR / "auth.json" AUTH_CONFIG_FILE = AUTH_CONFIG_DIR / "auth.json"
@@ -293,8 +296,8 @@ def auth_change_password():
except Exception as e: except Exception as e:
return jsonify({"error": str(e)}), 500 return jsonify({"error": str(e)}), 500
app = Flask(__name__) # app = Flask(__name__)
CORS(app) # Enable CORS for Next.js frontend # CORS(app) # Enable CORS for Next.js frontend
def identify_gpu_type(name, vendor=None, bus=None, driver=None): def identify_gpu_type(name, vendor=None, bus=None, driver=None):
""" """