Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make this work with ActivityPub WordPress plugin #101

Open
bekopharm opened this issue Dec 20, 2020 · 4 comments
Open

Make this work with ActivityPub WordPress plugin #101

bekopharm opened this issue Dec 20, 2020 · 4 comments

Comments

@bekopharm
Copy link

The issue is described here: Automattic/wordpress-activitypub#78 and according to @pfefferle can probably only be solved in XRay: Automattic/wordpress-activitypub#78 (comment)

@dshanske
Copy link

@aaronpk I think I thought of a workaround for this. I know it is an extra piece for your code, but how about this?

WordPress sites, even when delivering @pfefferle 's activitypub code, return two standard link headers.

rel="https://api.w.org/" - Which is a link to the WordPress Rest API endpoint
rel="alternate"; type="application/json" - Which is a link to the JSON representation of the URL in the Rest API endpoint.

Could you, if you detect this, indicating a WordPress site, refetch the HTML and parse?

@aaronpk
Copy link
Owner

aaronpk commented Dec 23, 2022

Ok I've given this some thought and I have a different plan for how to handle it on the XRay side.

XRay is used for a lot of things, one of which being fetching a page to verify a webmention. Given that is it extremely unlikely to receive a webmention from an ActivityPub JSON URL, I'll add an option to XRay so that the caller can say "I'm trying to fetch this page for webmention verification" and that will disable adding the ActivityPub Accept header, since it will never expect to receive ActivityPub JSON when verifying a webmention. That seems to be the cleanest option that should avoid special casing sites.

@aaronpk
Copy link
Owner

aaronpk commented Dec 23, 2022

Done in 438430f

Deploying to webmention.io now...

@aaronpk
Copy link
Owner

aaronpk commented Dec 23, 2022

Should be live now. Please test and let me know how it goes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants