this post was submitted on 06 Jul 2023
38 points (97.5% liked)

Fediverse

28297 readers
748 users here now

A community to talk about the Fediverse and all it's related services using ActivityPub (Mastodon, Lemmy, KBin, etc).

If you wanted to get help with moderating your own community then head over to [email protected]!

Rules

Learn more at these websites: Join The Fediverse Wiki, Fediverse.info, Wikipedia Page, The Federation Info (Stats), FediDB (Stats), Sub Rehab (Reddit Migration), Search Lemmy

founded 1 year ago
MODERATORS
 

Is it effective? Is it working for you? I don’t see myself running a Lemmy server, but Mastodon I would.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

Sure, you can do that. I think I have the answer though. Both sh.itjust.works and feddit.nu have the issue where they return html when they should return json if the Accept header isn't a very specific string. There's a patch for the nginx config to solve it available but it seems they've not applied it yet.

You can test any instance for this by doing the following.

Find a local user on the instance and get their page (https://instance.tld/u/username).
Find a linux (or any OS that has it) with curl installed and type the following:

curl -X GET -H 'Accept: application/activity+json,application/json' https://userlink

If the result is html they have not patched, if it is json, they have patched.

curl -X GET -H 'Accept: application/activity+json' https://userlink

Will return json all the time on all instances, and I've patched my kbin to use this Accept header until all are fixed.

[–] [email protected] 1 points 1 year ago (1 children)

Oh that makes sense, thank you for going above and beyond!

Is it worth contacting Ernest about implementing your fix for the main Kbin code for better compatibility or are most Lemmy instances likely to fix the issue so soon it's not worth bothering him?

[–] [email protected] 2 points 1 year ago

I have pull requests for other changes to do with federation. I have a branch with this change in, but I've so far not made it a PR because I didn't consider we should need to change this, and also because there was a patch on Lemmy's side already available. Lemmy.ml, lemmy.world, beehaw.org are all working correctly now for example.

But if this is going to go on for long, I may well turn it into a PR too and see what people think.