trying stuff out
This commit is contained in:
@@ -1,15 +1,16 @@
|
|||||||
:8080 {
|
:8080 {
|
||||||
reverse_proxy /* localhost:3000
|
reverse_proxy /* localhost:3000
|
||||||
reverse_proxy /api* localhost:8000
|
reverse_proxy /api* localhost:8000
|
||||||
reverse_proxy /rapidoc* localhost:8000
|
reverse_proxy /rapidoc* localhost:8000
|
||||||
reverse_proxy /openapi.json localhost:8000
|
reverse_proxy /openapi.json localhost:8000
|
||||||
reverse_proxy /socket.io* localhost:8000
|
rewrite /socket.io /socket.io/
|
||||||
reverse_proxy /socket.io/* localhost:8000
|
handle /socket.io/* {
|
||||||
reverse_proxy /ms http://localhost:7700
|
uri strip_prefix /path
|
||||||
|
rewrite * /socket.io{path}
|
||||||
|
reverse_proxy localhost:8000 {
|
||||||
|
header_up Host {host}
|
||||||
|
header_up X-Real-IP {remote}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
reverse_proxy /ms http://localhost:7700
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+12
-4
@@ -1,6 +1,14 @@
|
|||||||
:8080 {
|
:8080 {
|
||||||
reverse_proxy * http://frontend:3000
|
reverse_proxy * http://frontend:3000
|
||||||
reverse_proxy /api/* http://api:80
|
reverse_proxy /api/* http://api:80
|
||||||
reverse_proxy /openapi.json http://api:80 # Only use if you need to serve the OpenAPI spec
|
reverse_proxy /openapi.json http://api:80 # Only use if you need to serve the OpenAPI spec
|
||||||
reverse_proxy /socket.io/* api:80
|
rewrite /socket.io /socket.io/
|
||||||
|
handle /socket.io/* {
|
||||||
|
uri strip_prefix /path
|
||||||
|
rewrite * /socket.io{path}
|
||||||
|
reverse_proxy api:80 {
|
||||||
|
header_up Host {host}
|
||||||
|
header_up X-Real-IP {remote}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,12 +6,13 @@ import socketio
|
|||||||
from classquiz.config import redis, settings
|
from classquiz.config import redis, settings
|
||||||
from classquiz.db.models import PlayGame
|
from classquiz.db.models import PlayGame
|
||||||
|
|
||||||
sio = socketio.AsyncServer(async_mode="asgi", cors_allowed_origins=[])
|
sio = socketio.AsyncServer(async_mode="asgi", cors_allowed_origins=["https://classquiz.mawoka.eu"])
|
||||||
settings = settings()
|
settings = settings()
|
||||||
|
|
||||||
|
|
||||||
@sio.event
|
@sio.event
|
||||||
async def join_game(sid, data):
|
async def join_game(sid, data):
|
||||||
|
print(sid, data, "JOIN_GAME")
|
||||||
async with aiohttp.ClientSession() as session:
|
async with aiohttp.ClientSession() as session:
|
||||||
try:
|
try:
|
||||||
async with session.post(
|
async with session.post(
|
||||||
|
|||||||
Reference in New Issue
Block a user