fix: #13136, do not log 404s for AP requests

This commit is contained in:
Julian Lam
2025-02-20 12:24:17 -05:00
parent 7520e4f64d
commit 93f48409c5
3 changed files with 14 additions and 4 deletions

View File

@@ -64,6 +64,11 @@ Helpers.isUri = (value) => {
});
};
Helpers.assertAccept = accept => (accept && accept.split(',').some((value) => {
const parts = value.split(';').map(v => v.trim());
return activitypub._constants.acceptableTypes.includes(value || parts[0]);
}));
Helpers.isWebfinger = (value) => {
// N.B. returns normalized handle, so truthy check!
if (webfingerRegex.test(value) && !Helpers.isUri(value)) {