Merge remote-tracking branch 'origin/tills-branch' into tills-branch
This commit is contained in:
@@ -165,4 +165,8 @@ Der neue WebGL-basierte Hintergrund bietet:
|
|||||||
- Verbesserung der mobilen Benutzererfahrung
|
- Verbesserung der mobilen Benutzererfahrung
|
||||||
- Integration von Exportfunktionen für Mindmaps
|
- Integration von Exportfunktionen für Mindmaps
|
||||||
|
|
||||||
*Zuletzt aktualisiert: 15.06.2024*
|
*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 sqlalchemy.sql import func
|
||||||
from openai import OpenAI
|
from openai import OpenAI
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
from flask_cors import CORS
|
|
||||||
from flask_socketio import SocketIO, emit
|
from flask_socketio import SocketIO, emit
|
||||||
from flask_wtf.csrf import CSRFProtect
|
from flask_migrate import Migrate
|
||||||
|
|
||||||
# Modelle importieren
|
# Modelle importieren
|
||||||
from models import (
|
from models import (
|
||||||
@@ -43,6 +42,7 @@ app.config['SQLALCHEMY_DATABASE_URI'] = f'sqlite:///{db_path}'
|
|||||||
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
|
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
|
||||||
app.config['PERMANENT_SESSION_LIFETIME'] = timedelta(days=365) # Langlebige Session für Dark Mode-Einstellung
|
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['UPLOAD_FOLDER'] = os.getenv('UPLOAD_FOLDER', os.path.join(os.getcwd(), 'uploads'))
|
||||||
|
app.config['WTF_CSRF_ENABLED'] = False
|
||||||
|
|
||||||
# OpenAI API-Konfiguration
|
# OpenAI API-Konfiguration
|
||||||
api_key = os.environ.get("OPENAI_API_KEY")
|
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
|
# Erst nach der App-Initialisierung die DB-Check-Funktionen importieren
|
||||||
from utils.db_check import check_db_connection, initialize_db_if_needed
|
from utils.db_check import check_db_connection, initialize_db_if_needed
|
||||||
|
|
||||||
# CORS und SocketIO initialisieren
|
# SocketIO initialisieren
|
||||||
CORS(app)
|
socketio = SocketIO(app)
|
||||||
socketio = SocketIO(app, cors_allowed_origins="*")
|
|
||||||
|
|
||||||
# Security
|
migrate = Migrate(app, db)
|
||||||
csrf = CSRFProtect(app)
|
|
||||||
|
|
||||||
def create_default_categories():
|
def create_default_categories():
|
||||||
"""Erstellt die Standardkategorien für die Mindmap"""
|
"""Erstellt die Standardkategorien für die Mindmap"""
|
||||||
|
|||||||
Binary file not shown.
@@ -7,8 +7,8 @@ werkzeug==2.2.3
|
|||||||
flask-sqlalchemy==3.0.5
|
flask-sqlalchemy==3.0.5
|
||||||
openai
|
openai
|
||||||
requests==2.31.0
|
requests==2.31.0
|
||||||
flask-cors==4.0.0
|
|
||||||
gunicorn==21.2.0
|
gunicorn==21.2.0
|
||||||
#pillow==10.0.1
|
#pillow==10.0.1
|
||||||
pytest==7.4.0
|
pytest==7.4.0
|
||||||
pytest-flask==1.2.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