Update Webmentions.astro

This commit is contained in:
2026-08-27 21:55:11 +08:00
parent a616df9e09
commit 1207e862d4
+5 -1
View File
@@ -570,7 +570,11 @@ const getEndpoint = endpoint ? getWebmentionEndpoint(endpoint, 'get') : '';
fetch(form.action, { fetch(form.action, {
method: 'POST', method: 'POST',
body, body,
headers: { Accept: 'application/json' } // webmentiond currently requires this Content-Type without a charset suffix.
headers: {
Accept: 'application/json',
'Content-Type': 'application/x-www-form-urlencoded'
}
}).then(async (response) => { }).then(async (response) => {
if (!response.ok) { if (!response.ok) {
const message = plainText(await response.text()); const message = plainText(await response.text());