tantek.com

New issue on

GitHub project “webmention.io”


Webmention.io /api target= param should accept protocol relative URL to return http + https mentions

on (ttk.me b/4zM1) using BBEdit

The webmention.io /api endpoints accept a 'target' query parameter which currently must be an absolute URL. This proposal extends the 'target' query parameter to also accept a protocol relative URL (i.e. starting with "//") and return all mentions of that target with any protocol (e.g. both 'http:' and 'https:').

Use-case: this will allow sites which have migrated from http to https, or which still serve both http and https and accept webmentions for both, to easily query webmention.io for all mentions to either http/https versions of their permalinks, to show webmentions regardless of which protocol was used in their webmention target URLs.

Test-case: http://tantek.com/2019/065/e1/homebrew-website-club-sf is live with an iframe that embeds a display of RSVP webmentions via a service using a protocol relative URL in the target param to a webmention.io api call. Check both of these:

And you should see at least one RSVP displayed in the bottom from v2.jacky.wtf, likely with a green checkmark ✅. Here’s a direct link to just the RSVP display for that post but hardcoded to 'http:' mentions only: v2.jacky.wtf RSVP.