Closed RollMan closed 1 year ago
As long as Mastodon WebUI connects streaming with /
, TheDesk also cannot remove /
of streming url.
Okay that would be fine. Finally I'm sharing a quick workaround I found for those who are facing the same problem; I rewrote the requested location by the rewrite
directive with NGINX.
rewrite ^/api/v1/streaming/$ /api/v1/streaming break;
Thanks for the useful software!
Describe the bug
Initial launch or refleshing TheDesk fails to establish websocket connection due to unexpected 301 when NGINX performs reverse proxy between the client (TheDesk) and an ActivityPub instance.
To Reproduce
Expected Behavior
TheDesk should be able to connect to the websocket endpoint successfully and conduct real-time update of toots.
I am not sure very well but the ActivityPub server requires a URI of
wss://my_instance_domain/api/v1/streaming/
without a trailing slash (i.e.wss://my_instance_domain/api/v1/streaming
), otherwise nginx returns 301 which causes websocket errors. I tried to put a breakpoint inbareStreaming.ts
and removed the trailing slash from the variable ofstart
, then streaming seemed work well.Perhaps, the problem may not on the client but server should support URIs regardless it contains trailing slash or not.
Environment
Additional context
No response