Closed
Description
Describe the bug.
SubscribeOptions field from connect proxy response, is not working.
version: v5.4.4
Centrifugo version isv5.4.4
Client library used is github.com/centrifugal/centrifuge v0.33.1-0.20240801054640-96afa7258679
Operating system is macos
Steps to Reproduce How can the bug be triggered?
with config.yaml
for centrifugo like this:
proxy_connect_endpoint: http://192.168.1.1:8080/centrifugo-connect # this is the python fastapi address
proxy_connect_timeout: "2s"
Expected behavior What output or behaviour were you expecting instead?
join/leave events been emitted.
Code Snippets A minimum viable code snippet can be useful.
I use fastapi to be centrifugo proxy-handler.
# coding:utf8
import secrets
from pydantic import BaseModel
from fastapi import FastAPI
app = FastAPI()
class ReqCentConnect(BaseModel):
client: str
transport: str
protocol: str
name: str
data: object
@app.post("/centrifugo-connect")
async def on_connect(req: ReqCentConnect):
# uid = secrets.token_hex(4)
uid = req.client.split("-")[0]
return {
"result": {
"user": uid,
"data": {
"logo": "abc.png",
},
"channels": ["room"],
"subs": {
"room": {
"override": {
"presence": {
"value": True,
},
"join_leave": {
"value": True,
},
"force_push_join_leave": {
"value": True,
},
},
},
}
}
}
Metadata
Assignees
Labels
No labels
Activity