From 15bf6b5bdb24e5f88b4c6e39bd3de86fbeb67967 Mon Sep 17 00:00:00 2001 From: naskya Date: Mon, 2 Oct 2023 07:23:59 +0900 Subject: [PATCH] feat: reject crawling by default (close #36) --- README.md | 1 + packages/backend/migration/1606191203881-no-crawle.js | 2 +- packages/backend/src/models/entities/user-profile.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 157bdee35..98c9131a3 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ ## 細かい変更点 +- デフォルトで検索エンジンからのクロールを拒否するように変更 - 検索の MFM で使用する検索エンジンを設定から変更可能に - 以下の選択肢から選べます - DuckDuckGo (duckduckgo.com) diff --git a/packages/backend/migration/1606191203881-no-crawle.js b/packages/backend/migration/1606191203881-no-crawle.js index 4e7e82277..8eee71a26 100644 --- a/packages/backend/migration/1606191203881-no-crawle.js +++ b/packages/backend/migration/1606191203881-no-crawle.js @@ -4,7 +4,7 @@ export class noCrawle1606191203881 { } async up(queryRunner) { await queryRunner.query( - `ALTER TABLE "user_profile" ADD "noCrawle" boolean NOT NULL DEFAULT false`, + `ALTER TABLE "user_profile" ADD "noCrawle" boolean NOT NULL DEFAULT true`, ); await queryRunner.query( `COMMENT ON COLUMN "user_profile"."noCrawle" IS 'Whether reject index by crawler.'`, diff --git a/packages/backend/src/models/entities/user-profile.ts b/packages/backend/src/models/entities/user-profile.ts index 0b8863867..19c811cf9 100644 --- a/packages/backend/src/models/entities/user-profile.ts +++ b/packages/backend/src/models/entities/user-profile.ts @@ -162,7 +162,7 @@ export class UserProfile { public autoAcceptFollowed: boolean; @Column("boolean", { - default: false, + default: true, comment: "Whether reject index by crawler.", }) public noCrawle: boolean;