aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-07-15 15:30:14 +0200
committerChocobozzz <me@florianbigard.com>2022-07-18 11:37:18 +0200
commit42b40636991b97fe818007fab19091764fc5db73 (patch)
treedb431787c06ce898d22e91ff771f795219274fc6 /server/initializers
parent654d4ede7fa4d0faa71e49bcfab6b65a686397b2 (diff)
downloadPeerTube-42b40636991b97fe818007fab19091764fc5db73.tar.gz
PeerTube-42b40636991b97fe818007fab19091764fc5db73.tar.zst
PeerTube-42b40636991b97fe818007fab19091764fc5db73.zip
Add ability for client to create server logs
Diffstat (limited to 'server/initializers')
-rw-r--r--server/initializers/config.ts7
-rw-r--r--server/initializers/constants.ts6
2 files changed, 12 insertions, 1 deletions
diff --git a/server/initializers/config.ts b/server/initializers/config.ts
index 0943ffe2d..ba0f756ef 100644
--- a/server/initializers/config.ts
+++ b/server/initializers/config.ts
@@ -149,6 +149,10 @@ const CONFIG = {
149 WINDOW_MS: parseDurationToMs(config.get<string>('rates_limit.login.window')), 149 WINDOW_MS: parseDurationToMs(config.get<string>('rates_limit.login.window')),
150 MAX: config.get<number>('rates_limit.login.max') 150 MAX: config.get<number>('rates_limit.login.max')
151 }, 151 },
152 RECEIVE_CLIENT_LOG: {
153 WINDOW_MS: parseDurationToMs(config.get<string>('rates_limit.receive_client_log.window')),
154 MAX: config.get<number>('rates_limit.receive_client_log.max')
155 },
152 ASK_SEND_EMAIL: { 156 ASK_SEND_EMAIL: {
153 WINDOW_MS: parseDurationToMs(config.get<string>('rates_limit.ask_send_email.window')), 157 WINDOW_MS: parseDurationToMs(config.get<string>('rates_limit.ask_send_email.window')),
154 MAX: config.get<number>('rates_limit.ask_send_email.max') 158 MAX: config.get<number>('rates_limit.ask_send_email.max')
@@ -165,7 +169,8 @@ const CONFIG = {
165 ANONYMIZE_IP: config.get<boolean>('log.anonymize_ip'), 169 ANONYMIZE_IP: config.get<boolean>('log.anonymize_ip'),
166 LOG_PING_REQUESTS: config.get<boolean>('log.log_ping_requests'), 170 LOG_PING_REQUESTS: config.get<boolean>('log.log_ping_requests'),
167 LOG_TRACKER_UNKNOWN_INFOHASH: config.get<boolean>('log.log_tracker_unknown_infohash'), 171 LOG_TRACKER_UNKNOWN_INFOHASH: config.get<boolean>('log.log_tracker_unknown_infohash'),
168 PRETTIFY_SQL: config.get<boolean>('log.prettify_sql') 172 PRETTIFY_SQL: config.get<boolean>('log.prettify_sql'),
173 ACCEPT_CLIENT_LOG: config.get<boolean>('log.accept_client_log')
169 }, 174 },
170 OPEN_TELEMETRY: { 175 OPEN_TELEMETRY: {
171 METRICS: { 176 METRICS: {
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 009f878fc..8cb4d5f4a 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -365,6 +365,12 @@ const CONSTRAINTS_FIELDS = {
365 VIDEO_STUDIO: { 365 VIDEO_STUDIO: {
366 TASKS: { min: 1, max: 10 }, // Number of tasks 366 TASKS: { min: 1, max: 10 }, // Number of tasks
367 CUT_TIME: { min: 0 } // Value 367 CUT_TIME: { min: 0 } // Value
368 },
369 LOGS: {
370 CLIENT_MESSAGE: { min: 1, max: 1000 }, // Length
371 CLIENT_STACK_TRACE: { min: 1, max: 5000 }, // Length
372 CLIENT_META: { min: 1, max: 5000 }, // Length
373 CLIENT_USER_AGENT: { min: 1, max: 200 } // Length
368 } 374 }
369} 375}
370 376