fix: use Express 5 wildcard syntax for content negotiation route
Express 5 uses path-to-regexp v8 which requires named wildcards.
Bare "*" is no longer valid — use "{*path}" instead.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -192,7 +192,7 @@ export default class ActivityPubEndpoint {
|
|||||||
const router = express.Router(); // eslint-disable-line new-cap
|
const router = express.Router(); // eslint-disable-line new-cap
|
||||||
const self = this;
|
const self = this;
|
||||||
|
|
||||||
router.get("*", async (request, response, next) => {
|
router.get("{*path}", async (request, response, next) => {
|
||||||
const accept = request.headers.accept || "";
|
const accept = request.headers.accept || "";
|
||||||
const isActivityPub =
|
const isActivityPub =
|
||||||
accept.includes("application/activity+json") ||
|
accept.includes("application/activity+json") ||
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@rmdes/indiekit-endpoint-activitypub",
|
"name": "@rmdes/indiekit-endpoint-activitypub",
|
||||||
"version": "0.1.1",
|
"version": "0.1.2",
|
||||||
"description": "ActivityPub federation endpoint for Indiekit via Fedify. Adds full fediverse support: actor, inbox, outbox, followers, following, syndication, and Mastodon migration.",
|
"description": "ActivityPub federation endpoint for Indiekit via Fedify. Adds full fediverse support: actor, inbox, outbox, followers, following, syndication, and Mastodon migration.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"indiekit",
|
"indiekit",
|
||||||
|
|||||||
Reference in New Issue
Block a user