diff --git a/ghost/ghost/src/http/admin/controllers/activitypub.controller.ts b/ghost/ghost/src/http/admin/controllers/activitypub.controller.ts index f8917e4fd9e7..8bab54b01095 100644 --- a/ghost/ghost/src/http/admin/controllers/activitypub.controller.ts +++ b/ghost/ghost/src/http/admin/controllers/activitypub.controller.ts @@ -1,4 +1,4 @@ -import {Controller, Get, Param} from '@nestjs/common'; +import {Controller, Get, Header, Param} from '@nestjs/common'; import {Roles} from '../../../common/decorators/permissions.decorator'; import ObjectID from 'bson-objectid'; import {JSONLDService} from '../../../core/activitypub/jsonld.service'; @@ -9,6 +9,7 @@ export class ActivityPubController { private readonly service: JSONLDService ) {} + @Header('Cache-Control', 'no-store') @Roles(['Anon']) @Get('actor/:id') async getActor(@Param('id') id: unknown) { @@ -18,6 +19,7 @@ export class ActivityPubController { return this.service.getActor(ObjectID.createFromHexString(id)); } + @Header('Cache-Control', 'no-store') @Roles(['Anon']) @Get('key/:owner') async getKey(@Param('owner') owner: unknown) { @@ -27,6 +29,7 @@ export class ActivityPubController { return this.service.getPublicKey(ObjectID.createFromHexString(owner)); } + @Header('Cache-Control', 'no-store') @Roles(['Anon']) @Get('outbox/:owner') async getOutbox(@Param('owner') owner: unknown) { diff --git a/ghost/ghost/src/http/admin/controllers/webfinger.controller.ts b/ghost/ghost/src/http/admin/controllers/webfinger.controller.ts index 68552ebc9170..317ba48e11bd 100644 --- a/ghost/ghost/src/http/admin/controllers/webfinger.controller.ts +++ b/ghost/ghost/src/http/admin/controllers/webfinger.controller.ts @@ -1,4 +1,4 @@ -import {Controller, Get, Query} from '@nestjs/common'; +import {Controller, Get, Header, Query} from '@nestjs/common'; import {WebFingerService} from '../../../core/activitypub/webfinger.service'; @Controller('.well-known/webfinger') @@ -7,6 +7,7 @@ export class WebFingerController { private readonly service: WebFingerService ) {} + @Header('Cache-Control', 'no-store') @Get('') async getResource(@Query('resource') resource: unknown) { if (typeof resource !== 'string') {