summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/WellKnownServerService.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/backend/src/server/WellKnownServerService.ts')
-rw-r--r--packages/backend/src/server/WellKnownServerService.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/packages/backend/src/server/WellKnownServerService.ts b/packages/backend/src/server/WellKnownServerService.ts
index f48310c50f..fa6e095fd2 100644
--- a/packages/backend/src/server/WellKnownServerService.ts
+++ b/packages/backend/src/server/WellKnownServerService.ts
@@ -78,7 +78,7 @@ export class WellKnownServerService {
return XRD({ element: 'Link', attributes: {
rel: 'lrdd',
type: xrd,
- template: `${this.config.url}${webFingerPath}?resource={uri}`,
+ template: `${this.config.webUrl}${webFingerPath}?resource={uri}`,
} });
});
@@ -93,7 +93,7 @@ export class WellKnownServerService {
links: [{
rel: 'lrdd',
type: jrd,
- template: `${this.config.url}${webFingerPath}?resource={uri}`,
+ template: `${this.config.webUrl}${webFingerPath}?resource={uri}`,
}],
};
});
@@ -129,15 +129,15 @@ fastify.get('/.well-known/change-password', async (request, reply) => {
});
const generateQuery = (resource: string): FindOptionsWhere<MiUser> | number =>
- resource.startsWith(`${this.config.url.toLowerCase()}/users/`) ?
+ resource.startsWith(`${this.config.webUrl.toLowerCase()}/users/`) ?
fromId(resource.split('/').pop()!) :
fromAcct(Acct.parse(
- resource.startsWith(`${this.config.url.toLowerCase()}/@`) ? resource.split('/').pop()! :
+ resource.startsWith(`${this.config.localUrl.toLowerCase()}/@`) ? resource.split('/').pop()! :
resource.startsWith('acct:') ? resource.slice('acct:'.length) :
resource));
const fromAcct = (acct: Acct.Acct): FindOptionsWhere<MiUser> | number =>
- !acct.host || acct.host === this.config.host.toLowerCase() ? {
+ !acct.host || acct.host === this.config.localHost.toLowerCase() || acct.host === this.config.webHost.toLowerCase() ? {
usernameLower: acct.username.toLowerCase(),
host: IsNull(),
isSuspended: false,
@@ -162,8 +162,8 @@ fastify.get('/.well-known/change-password', async (request, reply) => {
return;
}
- const subject = `acct:${user.username}@${this.config.host}`;
- const profileLink = `${this.config.url}/@${user.username}`;
+ const subject = `acct:${user.username}@${this.config.localHost}`;
+ const profileLink = `${this.config.webUrl}/@${user.username}`;
const self = {
rel: 'self',
type: 'application/activity+json',
@@ -176,7 +176,7 @@ fastify.get('/.well-known/change-password', async (request, reply) => {
};
const subscribe = {
rel: 'http://ostatus.org/schema/1.0/subscribe',
- template: `${this.config.url}/authorize-follow?acct={uri}`,
+ template: `${this.config.webUrl}/authorize-follow?acct={uri}`,
};
vary(reply.raw, 'Accept');