fix(federation): 🐛 Always set content-type to JSON if there is a body

This commit is contained in:
Jesse Wierzbinski 2024-07-26 20:09:58 +02:00
parent 8f7b2d7bfe
commit 5b119949dc
No known key found for this signature in database

View file

@ -177,11 +177,7 @@ export class FederationRequester {
: extra?.headers), : extra?.headers),
}); });
if ( if (body) {
body &&
!(body instanceof FormData) &&
!headers.has("Content-Type")
) {
headers.set("Content-Type", "application/json; charset=utf-8"); headers.set("Content-Type", "application/json; charset=utf-8");
} }