[backend] Enable authorized fetch by default for new instances

This does not affect existing instances.
This commit is contained in:
Laura Hausmann 2023-10-18 19:19:01 +02:00
parent 5d496a1636
commit 6b45b7019c
No known key found for this signature in database
GPG Key ID: D044E84C5BE01605
2 changed files with 14 additions and 1 deletions

View File

@ -0,0 +1,13 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class SecureModeDefaults1697649475796 implements MigrationInterface {
name = 'SecureModeDefaults1697649475796'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "secureMode" SET DEFAULT true`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "secureMode" SET DEFAULT false`);
}
}

View File

@ -124,7 +124,7 @@ export class Meta {
public silencedHosts: string[];
@Column("boolean", {
default: false,
default: true,
})
public secureMode: boolean;