This commit is contained in:
Bryan Ashby 2022-12-31 17:51:03 -07:00
parent a00a93859e
commit 38098b46f1
No known key found for this signature in database
GPG Key ID: C2C1B501E4EFD994
2 changed files with 9 additions and 4 deletions

View File

@ -27,8 +27,8 @@ const ModuleInfo = (exports.moduleInfo = {
});
exports.WellKnownLocations = {
Rfc5785: '/.well-known',
Internal: '/_enig',
Rfc5785: '/.well-known', // https://www.rfc-editor.org/rfc/rfc5785
Internal: '/_enig', // location of most enigma provided routes
};
class Route {

View File

@ -11,11 +11,14 @@ const Log = require('../../../logger').log;
exports.moduleInfo = {
name: 'WebFinger',
desc: 'A simple WebFinger Handler',
desc: 'A simple WebFinger Handler.',
author: 'NuSkooler, CognitiveGears',
packageName: 'codes.l33t.enigma.web.handler.finger',
};
//
// WebFinger: https://www.rfc-editor.org/rfc/rfc7033
//
exports.getModule = class WebFingerServerModule extends WebHandlerModule {
constructor() {
super();
@ -44,8 +47,10 @@ exports.getModule = class WebFingerServerModule extends WebHandlerModule {
this.acceptedResourceRegExps = [
// acct:NAME@our.domain.tld
// https://www.rfc-editor.org/rfc/rfc7565
new RegExp(`^acct:(.+)@${domain}$`),
// profile URL
// profile page
// https://webfinger.net/rel/profile-page/
new RegExp(`^${ws.buildUrl(WellKnownLocations.Internal + '/wf/@')}(.+)$`),
// self URL
new RegExp(