Skip to content

Commit 4c4a68a

Browse files
committed
Try again to get cors working for engineio
1 parent 87fa471 commit 4c4a68a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

appyter/ext/socketio/server.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ class AsyncServer(
1414
`async with` is necessary for initialization
1515
'''
1616
def __init__(self, *args, **kwargs):
17-
super().__init__(*args, **kwargs)
17+
ChunkedEmitMixin.__init__()
18+
PriorityQueuedEmitMixin.__init__()
19+
socketio.AsyncServer.__init__(*args, **kwargs)
1820
self._listeners = { 'forward': [] }
1921

2022
async def __aenter__(self):

appyter/render/flask_app/socketio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from appyter.ext.socketio import AsyncServer
66

7-
socketio = AsyncServer(async_mode='aiohttp', cors_allowed_origins='*')
7+
socketio = AsyncServer(async_mode='aiohttp', cors_allowed_origins=[])
88

99
@socketio.on('connect')
1010
async def _(sid, environ):

0 commit comments

Comments
 (0)