diff options
Diffstat (limited to 'server/initializers')
-rw-r--r-- | server/initializers/constants.ts | 7 | ||||
-rw-r--r-- | server/initializers/database.ts | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 82373ba84..6d8aa7332 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -219,7 +219,11 @@ const VIDEO_MIMETYPE_EXT = { | |||
219 | const SERVER_ACCOUNT_NAME = 'peertube' | 219 | const SERVER_ACCOUNT_NAME = 'peertube' |
220 | 220 | ||
221 | const ACTIVITY_PUB = { | 221 | const ACTIVITY_PUB = { |
222 | ACCEPT_HEADER: 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"', | 222 | ACCEPT_HEADERS: [ |
223 | 'application/activity+json, application/ld+json', | ||
224 | 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"' | ||
225 | ], | ||
226 | ACCEPT_HEADER: '', | ||
223 | PUBLIC: 'https://www.w3.org/ns/activitystreams#Public', | 227 | PUBLIC: 'https://www.w3.org/ns/activitystreams#Public', |
224 | COLLECTION_ITEMS_PER_PAGE: 10, | 228 | COLLECTION_ITEMS_PER_PAGE: 10, |
225 | FETCH_PAGE_LIMIT: 100, | 229 | FETCH_PAGE_LIMIT: 100, |
@@ -230,6 +234,7 @@ const ACTIVITY_PUB = { | |||
230 | MAGNET: [ 'application/x-bittorrent;x-scheme-handler/magnet' ] | 234 | MAGNET: [ 'application/x-bittorrent;x-scheme-handler/magnet' ] |
231 | } | 235 | } |
232 | } | 236 | } |
237 | ACTIVITY_PUB.ACCEPT_HEADER = ACTIVITY_PUB.ACCEPT_HEADERS[0] | ||
233 | 238 | ||
234 | // --------------------------------------------------------------------------- | 239 | // --------------------------------------------------------------------------- |
235 | 240 | ||
diff --git a/server/initializers/database.ts b/server/initializers/database.ts index 9b9a81e26..90dbba5b9 100644 --- a/server/initializers/database.ts +++ b/server/initializers/database.ts | |||
@@ -66,6 +66,8 @@ const sequelize = new Sequelize(dbname, username, password, { | |||
66 | operatorsAliases: false, | 66 | operatorsAliases: false, |
67 | 67 | ||
68 | logging: (message: string, benchmark: number) => { | 68 | logging: (message: string, benchmark: number) => { |
69 | if (process.env.NODE_DB_LOG === 'false') return | ||
70 | |||
69 | let newMessage = message | 71 | let newMessage = message |
70 | if (isTestInstance() === true && benchmark !== undefined) { | 72 | if (isTestInstance() === true && benchmark !== undefined) { |
71 | newMessage += ' | ' + benchmark + 'ms' | 73 | newMessage += ' | ' + benchmark + 'ms' |