swicg / activitypub-html-discovery

Other
20 stars 0 forks source link

nodeinfo to short circuit entire process #24

Open julianlam opened 3 weeks ago

julianlam commented 3 weeks ago

While thinking through my own implementation it occurs to me that one could make a quick call to {domain}/.well-known/nodeinfo and stop processing immediately if that route returns non-200, since it's one signal you could use to determine that an instance does not support ActivityPub.

In terms of sensitivity vs. specificity, this is a not a high sensitivity test, because an instance returning nodeinfo might not be a true AP server or respond appropriately via any of the documented methods for link discovery.

However it is fairly specific, in that its absence can indicate no support at all. Given that nodeinfo support cannot be assumed, this test is not foolproof.

evanp commented 1 week ago

This seems high-risk! Not all servers implement node-info. Also, you're assuming that the HTML representation and the ActivityPub JSON-LD representation are on the same server -- this is not necessarily the case.