Merge remote-tracking branch 'misskey-dev/develop' into io

This commit is contained in:
まっちゃとーにゅ 2024-05-23 03:43:07 +09:00
commit 0f70bf57f3
No known key found for this signature in database
GPG key ID: 6AFBBF529601C1DB
71 changed files with 4144 additions and 2532 deletions

View file

@ -439,7 +439,7 @@ export class ClientServerService {
//#endregion
const renderBase = async (reply: FastifyReply) => {
const renderBase = async (reply: FastifyReply, data: { [key: string]: any } = {}) => {
const meta = await this.metaService.fetch();
reply.header('Cache-Control', 'public, max-age=30');
return await reply.view('base', {
@ -448,6 +448,7 @@ export class ClientServerService {
title: meta.name ?? 'Misskey',
desc: meta.description,
...await this.generateCommonPugData(meta),
...data,
});
};
@ -780,6 +781,18 @@ export class ClientServerService {
});
//#endregion
//region noindex pages
// Tags
fastify.get<{ Params: { clip: string; } }>('/tags/:tag', async (request, reply) => {
return await renderBase(reply, { noindex: true });
});
// User with Tags
fastify.get<{ Params: { clip: string; } }>('/user-tags/:tag', async (request, reply) => {
return await renderBase(reply, { noindex: true });
});
//endregion
fastify.get('/_info_card_', async (request, reply) => {
const meta = await this.metaService.fetch(true);