Merge remote-tracking branch 'origin/claude/fix-activitypub-og-image-CrCGI'
This commit is contained in:
@@ -30,26 +30,30 @@ const candidates = [
|
|||||||
|
|
||||||
const MARKER = "// ap-webfinger-before-auth patch";
|
const MARKER = "// ap-webfinger-before-auth patch";
|
||||||
|
|
||||||
const OLD_SNIPPET = ` // Only delegate to Fedify for NodeInfo data endpoint (/nodeinfo/2.1).
|
const OLD_SNIPPET = ` if (!self._fedifyMiddleware) return next();
|
||||||
// All other paths in this root-mounted router are handled by the
|
if (req.method !== "GET" && req.method !== "HEAD") return next();
|
||||||
// content negotiation catch-all below. Passing arbitrary paths like
|
// Only delegate to Fedify for NodeInfo data endpoint (/nodeinfo/2.1).
|
||||||
// /notes/... to Fedify causes harmless but noisy 404 warnings.
|
// All other paths in this root-mounted router are handled by the
|
||||||
if (!req.path.startsWith("/nodeinfo/")) return next();
|
// content negotiation catch-all below. Passing arbitrary paths like
|
||||||
return self._fedifyMiddleware(req, res, next);`;
|
// /notes/... to Fedify causes harmless but noisy 404 warnings.
|
||||||
|
if (!req.path.startsWith("/nodeinfo/")) return next();
|
||||||
|
return self._fedifyMiddleware(req, res, next);`;
|
||||||
|
|
||||||
const NEW_SNIPPET = ` // Delegate to Fedify for discovery endpoints:
|
const NEW_SNIPPET = ` if (!self._fedifyMiddleware) return next();
|
||||||
// /.well-known/webfinger — actor/resource identity resolution
|
if (req.method !== "GET" && req.method !== "HEAD") return next();
|
||||||
// /.well-known/nodeinfo — server capabilities advertised to the fediverse
|
// Delegate to Fedify for discovery endpoints:
|
||||||
// /nodeinfo/2.1 — NodeInfo data document
|
// /.well-known/webfinger — actor/resource identity resolution
|
||||||
// This router is mounted at "/" so req.url retains the full path, allowing
|
// /.well-known/nodeinfo — server capabilities advertised to the fediverse
|
||||||
// Fedify to match its internal routes correctly. (routesWellKnown strips
|
// /nodeinfo/2.1 — NodeInfo data document
|
||||||
// the /.well-known/ prefix, causing Fedify to miss the webfinger route.)
|
// This router is mounted at "/" so req.url retains the full path, allowing
|
||||||
// ap-webfinger-before-auth patch
|
// Fedify to match its internal routes correctly. (routesWellKnown strips
|
||||||
const isDiscoveryRoute =
|
// the /.well-known/ prefix, causing Fedify to miss the webfinger route.)
|
||||||
req.path.startsWith("/nodeinfo/") ||
|
// ap-webfinger-before-auth patch
|
||||||
req.path.startsWith("/.well-known/");
|
const isDiscoveryRoute =
|
||||||
if (!isDiscoveryRoute) return next();
|
req.path.startsWith("/nodeinfo/") ||
|
||||||
return self._fedifyMiddleware(req, res, next);`;
|
req.path.startsWith("/.well-known/");
|
||||||
|
if (!isDiscoveryRoute) return next();
|
||||||
|
return self._fedifyMiddleware(req, res, next);`;
|
||||||
|
|
||||||
async function exists(filePath) {
|
async function exists(filePath) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user