summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/web/ClientServerService.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-05-12 12:41:53 +0900
committerGitHub <noreply@github.com>2023-05-12 12:41:53 +0900
commitde6348e8a00a72c2410a8907d59a9bd29142a200 (patch)
treef163329a67ac5c6dc1c33845b4fc131a8c59a39b /packages/backend/src/server/web/ClientServerService.ts
parentMerge pull request #10814 from misskey-dev/develop (diff)
parentfix(frontend): fix retention rate heatmap rendering (diff)
downloadmisskey-de6348e8a00a72c2410a8907d59a9bd29142a200.tar.gz
misskey-de6348e8a00a72c2410a8907d59a9bd29142a200.tar.bz2
misskey-de6348e8a00a72c2410a8907d59a9bd29142a200.zip
Merge pull request #10833 from misskey-dev/develop
* refactor(frontend): use css modules * feat: 投稿したコンテンツのAIによる学習を軽減するオプションを追加 Resolve #10819 * enhance(backend): publicReactionsをデフォルトtrueに * 念のためnoimageaiもつける * add X-Robots-Tag: noai * Update ja-JP.yml * fix(frontend): ブラーエフェクトを有効にしている状態で高負荷になる問題を修正 * enhance(backend): graceful shutdown for job queue and refactor * fix(backend): テスト時は一部のサービスを停止 * fix test * New Crowdin updates (#10815) * New translations ja-JP.yml (English) * New translations ja-JP.yml (German) * New translations ja-JP.yml (Korean) * New translations ja-JP.yml (Chinese Traditional) * New translations ja-JP.yml (Chinese Traditional) * refactor * bump * refactor(frontend): use css module * refactor(frontend): use css module * delete unused component * センシティブワードを正規表現、CWにも適用するように (#10688) * cwにセンシティブが効いてない * CWが無いときにTextを見るように * 比較演算子間違えた * とりあえずチェック * 正規表現対応 * /test/giにも対応 * matchでしなくてもいいのでは感 * レビュー修正 * Update packages/backend/src/core/NoteCreateService.ts Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> * Update packages/backend/src/core/NoteCreateService.ts Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> * 修正 * wipかも * wordsでスペース区切りのものできたかも * なんか動いたかも * test作成 * 文言の修正 * 修正 * note参照 --------- Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> * Update CHANGELOG.md * New Crowdin updates (#10823) * New translations ja-JP.yml (English) * New translations ja-JP.yml (German) * ci: fix typo * fix(frontend): より明確な説明にしたのとtypo修正 * fix typo * fix(frontend): カラーバーがリプライには表示されないのを修正 * fix(frontend): チャンネル内の検索ボックスが挙動不審な問題を修正 Fix #10793 * enhance(backend): ノートのハッシュタグもMeilisearchに突っ込むように 今後ハッシュタグ検索とか実装するときのため * feat(frontend): ユーザー指定ノート検索 * fix(frontend): fix retention chart rendering * Update about-misskey.vue * meta: Remove @rinsuki from reviewer-lottery (#10830) * New Crowdin updates (#10824) * New translations ja-JP.yml (English) * New translations ja-JP.yml (German) * New translations ja-JP.yml (Chinese Traditional) * New translations ja-JP.yml (English) * New translations ja-JP.yml (Chinese Traditional) * New translations ja-JP.yml (German) * New translations ja-JP.yml (English) * New translations ja-JP.yml (Chinese Traditional) * New translations ja-JP.yml (French) * New translations ja-JP.yml (German) * New translations ja-JP.yml (English) * New translations ja-JP.yml (Japanese, Kansai) * New translations ja-JP.yml (Chinese Traditional) * New translations ja-JP.yml (Spanish) * New translations ja-JP.yml (German) * New translations ja-JP.yml (Italian) * New translations ja-JP.yml (Korean) * New translations ja-JP.yml (Norwegian) * New translations ja-JP.yml (Russian) * New translations ja-JP.yml (Chinese Simplified) * New translations ja-JP.yml (Indonesian) * New translations ja-JP.yml (Thai) * enhance(frontend): アカウント初期設定ウィザードにプライバシー設定を追加 * Update CHANGELOG.md * fix(backend): ひとつのMeilisearchサーバーを複数のMisskeyサーバーで使えない問題を修正 * fix MkUserSetupDialog.Privacy.vue * ci: skip non-Japanese locale on TurboSnap * ci: notify on changes for push events * ci: fix missing branch * Update basic.cy.js * [ci skip] New Crowdin updates (#10834) * New translations ja-JP.yml (English) * New translations ja-JP.yml (Arabic) * New translations ja-JP.yml (German) * New translations ja-JP.yml (Chinese Simplified) * New translations ja-JP.yml (Japanese, Kansai) * New translations ja-JP.yml (Arabic) * :art: * :art: * enhance(frontend): add retention line chart * update deps * refactor * fix(frontend): Pageにおいて画像ブロックに画像を設定できない問題を修正 Fix #10837 --------- Co-authored-by: nenohi <kimutipartylove@gmail.com> Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> Co-authored-by: rinsuki <428rinsuki+git@gmail.com>
Diffstat (limited to 'packages/backend/src/server/web/ClientServerService.ts')
-rw-r--r--packages/backend/src/server/web/ClientServerService.ts26
1 files changed, 25 insertions, 1 deletions
diff --git a/packages/backend/src/server/web/ClientServerService.ts b/packages/backend/src/server/web/ClientServerService.ts
index 50b23a0682..f780280c1f 100644
--- a/packages/backend/src/server/web/ClientServerService.ts
+++ b/packages/backend/src/server/web/ClientServerService.ts
@@ -35,8 +35,8 @@ import { RoleService } from '@/core/RoleService.js';
import manifest from './manifest.json' assert { type: 'json' };
import { FeedService } from './FeedService.js';
import { UrlPreviewService } from './UrlPreviewService.js';
-import type { FastifyInstance, FastifyPluginOptions, FastifyReply } from 'fastify';
import { ClientLoggerService } from './ClientLoggerService.js';
+import type { FastifyInstance, FastifyPluginOptions, FastifyReply } from 'fastify';
const _filename = fileURLToPath(import.meta.url);
const _dirname = dirname(_filename);
@@ -423,6 +423,10 @@ export class ClientServerService {
: [];
reply.header('Cache-Control', 'public, max-age=15');
+ if (profile.preventAiLearning) {
+ reply.header('X-Robots-Tag', 'noimageai');
+ reply.header('X-Robots-Tag', 'noai');
+ }
return await reply.view('user', {
user, profile, me,
avatarUrl: user.avatarUrl ?? this.userEntityService.getIdenticonUrl(user),
@@ -467,6 +471,10 @@ export class ClientServerService {
const profile = await this.userProfilesRepository.findOneByOrFail({ userId: note.userId });
const meta = await this.metaService.fetch();
reply.header('Cache-Control', 'public, max-age=15');
+ if (profile.preventAiLearning) {
+ reply.header('X-Robots-Tag', 'noimageai');
+ reply.header('X-Robots-Tag', 'noai');
+ }
return await reply.view('note', {
note: _note,
profile,
@@ -506,6 +514,10 @@ export class ClientServerService {
} else {
reply.header('Cache-Control', 'private, max-age=0, must-revalidate');
}
+ if (profile.preventAiLearning) {
+ reply.header('X-Robots-Tag', 'noimageai');
+ reply.header('X-Robots-Tag', 'noai');
+ }
return await reply.view('page', {
page: _page,
profile,
@@ -530,6 +542,10 @@ export class ClientServerService {
const profile = await this.userProfilesRepository.findOneByOrFail({ userId: flash.userId });
const meta = await this.metaService.fetch();
reply.header('Cache-Control', 'public, max-age=15');
+ if (profile.preventAiLearning) {
+ reply.header('X-Robots-Tag', 'noimageai');
+ reply.header('X-Robots-Tag', 'noai');
+ }
return await reply.view('flash', {
flash: _flash,
profile,
@@ -554,6 +570,10 @@ export class ClientServerService {
const profile = await this.userProfilesRepository.findOneByOrFail({ userId: clip.userId });
const meta = await this.metaService.fetch();
reply.header('Cache-Control', 'public, max-age=15');
+ if (profile.preventAiLearning) {
+ reply.header('X-Robots-Tag', 'noimageai');
+ reply.header('X-Robots-Tag', 'noai');
+ }
return await reply.view('clip', {
clip: _clip,
profile,
@@ -576,6 +596,10 @@ export class ClientServerService {
const profile = await this.userProfilesRepository.findOneByOrFail({ userId: post.userId });
const meta = await this.metaService.fetch();
reply.header('Cache-Control', 'public, max-age=15');
+ if (profile.preventAiLearning) {
+ reply.header('X-Robots-Tag', 'noimageai');
+ reply.header('X-Robots-Tag', 'noai');
+ }
return await reply.view('gallery-post', {
post: _post,
profile,