except not always, the API routes aren’t setting the cors header
… why not
@aurynn I think that nginx bit is possibly the part goofing up here.
Your server seems to report that the websocket is available at wss://cloudisland.nz, but if I try to make a websocket request, it 302s me over to your about page (unexpected behavior).
when i run the same experiment on my server, it gives me a JSON error because I'm not auth'd (expected behavior).
@aurynn here is how i tested against mine:
curl --include --no-buffer --header "Connection: Upgrade" --header "Upgrade: websocket" --header "Host: social-streaming.emilylilyli.me" --header "Origin: https://social-streaming.emilylilyli.me" --header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" --header "Sec-WebSocket-Version: 13" -vvv https://social-streaming.emilylilyli.me
@aurynn that's probably the issue, yeah. i keep the API server (which is its own separate node thing that happens to be bundled with mastodon) on a separate container with a separate server name, just to make things work right.
@emilyst the API server is on its own port with a custom nginx upstream, and I was using the example nginx config, so I expected it to work
time to figure out wss 😄
@aurynn what port is it on? that seems not to be making it to the metadata communicated on the web interface.
@emilyst it shouldn’t be being communicated forward, since its serving a specific route - /api/v1/streaming - off of an upstream on a different port
@aurynn hmm, well, i am not 100% sure i am correct then.
i noticed i get a 400 when i try to hit `https://cloudisland.nz/api/v1/streaming` using curl, but that might be correct. (mine, again, just spits out an auth error.)
carry on. hard to debug from here when i don't know how things are meant to be set up.
@emilyst what’s the full curl command you’re using there? I’m getting a 500 if I do a bare GET, which is what I expect
@aurynn curl --include --no-buffer --header "Connection: Upgrade" --header "Upgrade: websocket" --header "Host: cloudisland.nz" --header "Origin: https://cloudisland.nz" --header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" --header "Sec-WebSocket-Version: 13" -vvv https://cloudisland.nz/api/v1/streaming
@aurynn hmmm, i don't know about that, but again, your setup seems to do things that i don't understand, so i'm content to let you do your thing and not butt in anymore.
@aurynn is this a server you can actually log into and issue requests locally? you could rule out some kinda nginx configuration issue by issuing a `curl` directly to the node instance on the server and see what the response looks like. then compare from outside.
if they're the same, nginx isn't the problem. if not, nginx is a problem.
@aurynn okay. welp. idk.
(i'm restarting my NAS, so my Mastodon instance will be down for a few minutes.)
A paid, early access, strongly moderated Mastodon instance hosted entirely in New Zealand.