@rmdes/indiekit-endpoint-activitypub 3.13.12 → 3.13.13

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.
@@ -126,9 +126,13 @@ export function buildContentNegotiationRoutes(self) {
126
126
  return next();
127
127
  }
128
128
 
129
+ // Match regardless of trailing slash: posts are stored without one, but
130
+ // AS2 dereference requests (and nginx AS2 proxy passthrough) can arrive
131
+ // with a trailing slash. Try both so content negotiation stays robust.
129
132
  const requestUrl = `${self._publicationUrl}${req.path.slice(1)}`;
133
+ const requestUrlNoSlash = requestUrl.replace(/\/$/, "");
130
134
  const post = await postsCollection.findOne({
131
- "properties.url": requestUrl,
135
+ "properties.url": { $in: [requestUrlNoSlash, `${requestUrlNoSlash}/`] },
132
136
  });
133
137
 
134
138
  if (!post || post.properties?.deleted) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rmdes/indiekit-endpoint-activitypub",
3
- "version": "3.13.12",
3
+ "version": "3.13.13",
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",