fix(config): 🐛 Make some default config values more sensible

This commit is contained in:
Jesse Wierzbinski 2024-10-04 18:36:32 +02:00
parent f9dcbb1be8
commit c0805ff125
No known key found for this signature in database
3 changed files with 16 additions and 21 deletions

View file

@ -31,7 +31,7 @@ enabled = true
# Redis instance to be used as a timeline cache # Redis instance to be used as a timeline cache
# Optional, can be the same as the queue instance # Optional, can be the same as the queue instance
host = "localhost" host = "localhost"
port = 40004 port = 6380
password = "" password = ""
database = 1 database = 1
enabled = false enabled = false
@ -39,7 +39,7 @@ enabled = false
[sonic] [sonic]
# If Sonic is not configured, search will not be enabled # If Sonic is not configured, search will not be enabled
host = "localhost" host = "localhost"
port = 40007 port = 7700
password = "" password = ""
enabled = true enabled = true
@ -187,17 +187,17 @@ convert_vector = false
[validation] [validation]
# Checks user data # Checks user data
# Does not retroactively apply to previously entered data # Does not retroactively apply to previously entered data
max_displayname_size = 50 max_displayname_size = 50 # Character length
max_bio_size = 160 max_bio_size = 5000
max_note_size = 5000 max_note_size = 5000
max_avatar_size = 5_000_000 max_avatar_size = 5_000_000 # Bytes
max_header_size = 5_000_000 max_header_size = 5_000_000
max_media_size = 40_000_000 max_media_size = 40_000_000
max_media_attachments = 10 max_media_attachments = 10
max_media_description_size = 1000 max_media_description_size = 1000
max_poll_options = 20 max_poll_options = 20
max_poll_option_size = 500 max_poll_option_size = 500
min_poll_duration = 60 min_poll_duration = 60 # Seconds
max_poll_duration = 1893456000 max_poll_duration = 1893456000
max_username_size = 30 max_username_size = 30
max_field_count = 10 max_field_count = 10
@ -205,8 +205,7 @@ max_field_name_size = 1000
max_field_value_size = 1000 max_field_value_size = 1000
# Forbidden usernames, defaults are from Akkoma # Forbidden usernames, defaults are from Akkoma
username_blacklist = [ username_blacklist = [
".well-known", "well-known",
"~",
"about", "about",
"activities", "activities",
"api", "api",
@ -293,7 +292,7 @@ placeholder_style = "thumbs"
[federation] [federation]
# This is a list of domain names, such as "mastodon.social" or "pleroma.site" # This is a list of domain names, such as "mastodon.social" or "pleroma.site"
# These changes will not retroactively apply to existing data before they were changed # These changes will not retroactively apply to existing data before they were changed
# For that, please use the CLI # For that, please use the CLI (in a later release)
# These instances will not be federated with # These instances will not be federated with
blocked = [] blocked = []

View file

@ -578,7 +578,7 @@
}, },
"max_bio_size": { "max_bio_size": {
"type": "integer", "type": "integer",
"default": 160 "default": 5000
}, },
"max_note_size": { "max_note_size": {
"type": "integer", "type": "integer",
@ -642,8 +642,7 @@
"type": "string" "type": "string"
}, },
"default": [ "default": [
".well-known", "well-known",
"~",
"about", "about",
"activities", "activities",
"api", "api",
@ -1932,7 +1931,7 @@
"additionalProperties": false, "additionalProperties": false,
"default": { "default": {
"max_displayname_size": 50, "max_displayname_size": 50,
"max_bio_size": 160, "max_bio_size": 5000,
"max_note_size": 5000, "max_note_size": 5000,
"max_avatar_size": 5000000, "max_avatar_size": 5000000,
"max_header_size": 5000000, "max_header_size": 5000000,
@ -1948,8 +1947,7 @@
"max_field_name_size": 1000, "max_field_name_size": 1000,
"max_field_value_size": 1000, "max_field_value_size": 1000,
"username_blacklist": [ "username_blacklist": [
".well-known", "well-known",
"~",
"about", "about",
"activities", "activities",
"api", "api",

View file

@ -283,7 +283,7 @@ export const configValidator = z.object({
validation: z validation: z
.object({ .object({
max_displayname_size: z.number().int().default(50), max_displayname_size: z.number().int().default(50),
max_bio_size: z.number().int().default(160), max_bio_size: z.number().int().default(5000),
max_note_size: z.number().int().default(5000), max_note_size: z.number().int().default(5000),
max_avatar_size: z.number().int().default(5000000), max_avatar_size: z.number().int().default(5000000),
max_header_size: z.number().int().default(5000000), max_header_size: z.number().int().default(5000000),
@ -301,8 +301,7 @@ export const configValidator = z.object({
username_blacklist: z username_blacklist: z
.array(z.string()) .array(z.string())
.default([ .default([
".well-known", "well-known",
"~",
"about", "about",
"activities", "activities",
"api", "api",
@ -371,7 +370,7 @@ export const configValidator = z.object({
}) })
.default({ .default({
max_displayname_size: 50, max_displayname_size: 50,
max_bio_size: 160, max_bio_size: 5000,
max_note_size: 5000, max_note_size: 5000,
max_avatar_size: 5000000, max_avatar_size: 5000000,
max_header_size: 5000000, max_header_size: 5000000,
@ -387,8 +386,7 @@ export const configValidator = z.object({
max_field_name_size: 1000, max_field_name_size: 1000,
max_field_value_size: 1000, max_field_value_size: 1000,
username_blacklist: [ username_blacklist: [
".well-known", "well-known",
"~",
"about", "about",
"activities", "activities",
"api", "api",