@rmdes/indiekit-endpoint-activitypub 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +4 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -150,8 +150,12 @@ export default class ActivityPubEndpoint {
150
150
  const self = this;
151
151
 
152
152
  // Let Fedify handle NodeInfo data (/nodeinfo/2.1)
153
+ // Only pass GET/HEAD requests — POST/PUT/DELETE must not go through
154
+ // Fedify here, because fromExpressRequest() consumes the body stream,
155
+ // breaking Express body-parsed routes downstream (e.g. admin forms).
153
156
  router.use((req, res, next) => {
154
157
  if (!self._fedifyMiddleware) return next();
158
+ if (req.method !== "GET" && req.method !== "HEAD") return next();
155
159
  return self._fedifyMiddleware(req, res, next);
156
160
  });
157
161
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rmdes/indiekit-endpoint-activitypub",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "ActivityPub federation endpoint for Indiekit via Fedify. Adds full fediverse support: actor, inbox, outbox, followers, following, syndication, and Mastodon migration.",
5
5
  "keywords": [
6
6
  "indiekit",