Comments
This commit is contained in:
parent
a00a93859e
commit
38098b46f1
|
@ -27,8 +27,8 @@ const ModuleInfo = (exports.moduleInfo = {
|
||||||
});
|
});
|
||||||
|
|
||||||
exports.WellKnownLocations = {
|
exports.WellKnownLocations = {
|
||||||
Rfc5785: '/.well-known',
|
Rfc5785: '/.well-known', // https://www.rfc-editor.org/rfc/rfc5785
|
||||||
Internal: '/_enig',
|
Internal: '/_enig', // location of most enigma provided routes
|
||||||
};
|
};
|
||||||
|
|
||||||
class Route {
|
class Route {
|
||||||
|
|
|
@ -11,11 +11,14 @@ const Log = require('../../../logger').log;
|
||||||
|
|
||||||
exports.moduleInfo = {
|
exports.moduleInfo = {
|
||||||
name: 'WebFinger',
|
name: 'WebFinger',
|
||||||
desc: 'A simple WebFinger Handler',
|
desc: 'A simple WebFinger Handler.',
|
||||||
author: 'NuSkooler, CognitiveGears',
|
author: 'NuSkooler, CognitiveGears',
|
||||||
packageName: 'codes.l33t.enigma.web.handler.finger',
|
packageName: 'codes.l33t.enigma.web.handler.finger',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//
|
||||||
|
// WebFinger: https://www.rfc-editor.org/rfc/rfc7033
|
||||||
|
//
|
||||||
exports.getModule = class WebFingerServerModule extends WebHandlerModule {
|
exports.getModule = class WebFingerServerModule extends WebHandlerModule {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
|
@ -44,8 +47,10 @@ exports.getModule = class WebFingerServerModule extends WebHandlerModule {
|
||||||
|
|
||||||
this.acceptedResourceRegExps = [
|
this.acceptedResourceRegExps = [
|
||||||
// acct:NAME@our.domain.tld
|
// acct:NAME@our.domain.tld
|
||||||
|
// https://www.rfc-editor.org/rfc/rfc7565
|
||||||
new RegExp(`^acct:(.+)@${domain}$`),
|
new RegExp(`^acct:(.+)@${domain}$`),
|
||||||
// profile URL
|
// profile page
|
||||||
|
// https://webfinger.net/rel/profile-page/
|
||||||
new RegExp(`^${ws.buildUrl(WellKnownLocations.Internal + '/wf/@')}(.+)$`),
|
new RegExp(`^${ws.buildUrl(WellKnownLocations.Internal + '/wf/@')}(.+)$`),
|
||||||
// self URL
|
// self URL
|
||||||
new RegExp(
|
new RegExp(
|
||||||
|
|
Loading…
Reference in New Issue