summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/ActivityPubServerService.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/backend/src/server/ActivityPubServerService.ts')
-rw-r--r--packages/backend/src/server/ActivityPubServerService.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/backend/src/server/ActivityPubServerService.ts b/packages/backend/src/server/ActivityPubServerService.ts
index 54ffeecc6b..8e582eafa4 100644
--- a/packages/backend/src/server/ActivityPubServerService.ts
+++ b/packages/backend/src/server/ActivityPubServerService.ts
@@ -99,7 +99,7 @@ export class ActivityPubServerService {
private async packActivity(note: MiNote): Promise<any> {
if (isRenote(note) && !isQuote(note)) {
const renote = await this.notesRepository.findOneByOrFail({ id: note.renoteId });
- return this.apRendererService.renderAnnounce(renote.uri ? renote.uri : `${this.config.url}/notes/${renote.id}`, note);
+ return this.apRendererService.renderAnnounce(renote.uri ? renote.uri : `${this.config.webUrl}/notes/${renote.id}`, note);
}
return this.apRendererService.renderCreate(await this.apRendererService.renderNote(note, false), note);
@@ -122,7 +122,7 @@ export class ActivityPubServerService {
}
if (signature.params.headers.indexOf('host') === -1
- || request.headers.host !== this.config.host) {
+ || (request.headers.host !== this.config.localHost && request.headers.host !== this.config.webHost)) {
// Host not specified or not match.
reply.code(401);
return;
@@ -223,7 +223,7 @@ export class ActivityPubServerService {
//#endregion
const limit = 10;
- const partOf = `${this.config.url}/users/${userId}/followers`;
+ const partOf = `${this.config.webUrl}/users/${userId}/followers`;
if (page) {
const query = {
@@ -320,7 +320,7 @@ export class ActivityPubServerService {
//#endregion
const limit = 10;
- const partOf = `${this.config.url}/users/${userId}/following`;
+ const partOf = `${this.config.webUrl}/users/${userId}/following`;
if (page) {
const query = {
@@ -403,7 +403,7 @@ export class ActivityPubServerService {
const renderedNotes = await Promise.all(pinnedNotes.map(note => this.apRendererService.renderNote(note)));
const rendered = this.apRendererService.renderOrderedCollection(
- `${this.config.url}/users/${userId}/collections/featured`,
+ `${this.config.webUrl}/users/${userId}/collections/featured`,
renderedNotes.length,
undefined,
undefined,
@@ -460,7 +460,7 @@ export class ActivityPubServerService {
}
const limit = 20;
- const partOf = `${this.config.url}/users/${userId}/outbox`;
+ const partOf = `${this.config.webUrl}/users/${userId}/outbox`;
if (page) {
const notes = this.meta.enableFanoutTimeline ? await this.fanoutTimelineEndpointService.getMiNotes({