Merge remote-tracking branch 'origin/tills-branch' into tills-branch
This commit is contained in:
@@ -166,3 +166,7 @@ Der neue WebGL-basierte Hintergrund bietet:
|
||||
- Integration von Exportfunktionen für Mindmaps
|
||||
|
||||
*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.
|
||||
Binary file not shown.
Binary file not shown.
12
app.py
12
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"""
|
||||
|
||||
Binary file not shown.
@@ -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
|
||||
Flask-Migrate
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user