Add CORS
This commit is contained in:
@@ -4,6 +4,7 @@ import websockets
|
||||
import json
|
||||
import uuid
|
||||
from quart import Quart, jsonify, request
|
||||
from quart_cors import cors
|
||||
from routers.systems import systems_bp
|
||||
from routers.nodes import nodes_bp, register_client, unregister_client
|
||||
from routers.bot import bot_bp
|
||||
@@ -53,6 +54,7 @@ async def websocket_server_handler(websocket):
|
||||
|
||||
# --- Quart API Components ---
|
||||
app = Quart(__name__)
|
||||
app = cors(app, allow_origin="*")
|
||||
|
||||
# Store the websocket server instance
|
||||
websocket_server_instance = None
|
||||
|
||||
Reference in New Issue
Block a user