diff --git a/ROADMAP.md b/ROADMAP.md index e1d0d88..bd55bc9 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -165,4 +165,8 @@ Der neue WebGL-basierte Hintergrund bietet: - Verbesserung der mobilen Benutzererfahrung - Integration von Exportfunktionen für Mindmaps -*Zuletzt aktualisiert: 15.06.2024* \ No newline at end of file +*Zuletzt aktualisiert: 15.06.2024* + +## [Entfernt] CORS-Unterstützung (flask-cors) +- Die flask-cors-Bibliothek und alle zugehörigen Initialisierungen wurden entfernt. +- CORS wird nicht mehr unterstützt oder benötigt. \ No newline at end of file diff --git a/__pycache__/app.cpython-311.pyc b/__pycache__/app.cpython-311.pyc index 209d477..491a265 100644 Binary files a/__pycache__/app.cpython-311.pyc and b/__pycache__/app.cpython-311.pyc differ diff --git a/__pycache__/models.cpython-311.pyc b/__pycache__/models.cpython-311.pyc index 6b906fa..f4e031e 100644 Binary files a/__pycache__/models.cpython-311.pyc and b/__pycache__/models.cpython-311.pyc differ diff --git a/app.py b/app.py index 9aa310d..099f55e 100644 --- a/app.py +++ b/app.py @@ -17,9 +17,8 @@ import secrets from sqlalchemy.sql import func from openai import OpenAI from dotenv import load_dotenv -from flask_cors import CORS from flask_socketio import SocketIO, emit -from flask_wtf.csrf import CSRFProtect +from flask_migrate import Migrate # Modelle importieren from models import ( @@ -43,6 +42,7 @@ app.config['SQLALCHEMY_DATABASE_URI'] = f'sqlite:///{db_path}' app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False app.config['PERMANENT_SESSION_LIFETIME'] = timedelta(days=365) # Langlebige Session für Dark Mode-Einstellung app.config['UPLOAD_FOLDER'] = os.getenv('UPLOAD_FOLDER', os.path.join(os.getcwd(), 'uploads')) +app.config['WTF_CSRF_ENABLED'] = False # OpenAI API-Konfiguration api_key = os.environ.get("OPENAI_API_KEY") @@ -92,12 +92,10 @@ login_manager.login_view = 'login' # Erst nach der App-Initialisierung die DB-Check-Funktionen importieren from utils.db_check import check_db_connection, initialize_db_if_needed -# CORS und SocketIO initialisieren -CORS(app) -socketio = SocketIO(app, cors_allowed_origins="*") +# SocketIO initialisieren +socketio = SocketIO(app) -# Security -csrf = CSRFProtect(app) +migrate = Migrate(app, db) def create_default_categories(): """Erstellt die Standardkategorien für die Mindmap""" diff --git a/database/systades.db b/database/systades.db index 8a04d1c..6a14d3c 100644 Binary files a/database/systades.db and b/database/systades.db differ diff --git a/requirements.txt b/requirements.txt index 7917c56..ab35693 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,8 +7,8 @@ werkzeug==2.2.3 flask-sqlalchemy==3.0.5 openai requests==2.31.0 -flask-cors==4.0.0 gunicorn==21.2.0 #pillow==10.0.1 pytest==7.4.0 -pytest-flask==1.2.0 \ No newline at end of file +pytest-flask==1.2.0 +Flask-Migrate \ No newline at end of file diff --git a/systades.db b/systades.db deleted file mode 100644 index e69de29..0000000 diff --git a/utils/__pycache__/__init__.cpython-311.pyc b/utils/__pycache__/__init__.cpython-311.pyc index 5b2e666..613d2b4 100644 Binary files a/utils/__pycache__/__init__.cpython-311.pyc and b/utils/__pycache__/__init__.cpython-311.pyc differ diff --git a/utils/__pycache__/db_fix.cpython-311.pyc b/utils/__pycache__/db_fix.cpython-311.pyc index 67f0fef..fe2d90b 100644 Binary files a/utils/__pycache__/db_fix.cpython-311.pyc and b/utils/__pycache__/db_fix.cpython-311.pyc differ diff --git a/utils/__pycache__/db_rebuild.cpython-311.pyc b/utils/__pycache__/db_rebuild.cpython-311.pyc index 21d2918..a059a74 100644 Binary files a/utils/__pycache__/db_rebuild.cpython-311.pyc and b/utils/__pycache__/db_rebuild.cpython-311.pyc differ diff --git a/utils/__pycache__/db_test.cpython-311.pyc b/utils/__pycache__/db_test.cpython-311.pyc index 5a6f577..9fc961e 100644 Binary files a/utils/__pycache__/db_test.cpython-311.pyc and b/utils/__pycache__/db_test.cpython-311.pyc differ diff --git a/utils/__pycache__/server.cpython-311.pyc b/utils/__pycache__/server.cpython-311.pyc index 8916ed1..9e1d591 100644 Binary files a/utils/__pycache__/server.cpython-311.pyc and b/utils/__pycache__/server.cpython-311.pyc differ diff --git a/utils/__pycache__/user_manager.cpython-311.pyc b/utils/__pycache__/user_manager.cpython-311.pyc index a1b3930..40def1d 100644 Binary files a/utils/__pycache__/user_manager.cpython-311.pyc and b/utils/__pycache__/user_manager.cpython-311.pyc differ