Added flask_cors

This commit is contained in:
Joakim Svensson
2025-12-30 23:40:28 +00:00
parent a1e85e7db5
commit 4c39963faa
2 changed files with 4 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ import threading
import queue
import requests
from flask import Flask, request, jsonify
from flask_cors import CORS
from playwright.sync_api import sync_playwright
EMAIL = os.environ.get("HEDGEDOC_EMAIL")
@@ -23,6 +24,8 @@ NOTES_FILE = "active_notes.txt"
new_notes_queue = queue.Queue()
app = Flask(__name__)
CORS(app)
# ---------- LLM Integration ----------
def call_llm(context_text, chat_history):
if not LLM_API_KEY: