mirror of
https://github.com/diced/zipline.git
synced 2026-01-07 10:50:41 -08:00
add config option for logging
This commit is contained in:
@@ -220,13 +220,7 @@ server.addHook('preHandler', async (req, reply) => {
|
||||
});
|
||||
|
||||
server.addHook('onResponse', (req, res, done) => {
|
||||
if (
|
||||
!req.url.startsWith('/_next') &&
|
||||
!req.url.startsWith('/api/upload') &&
|
||||
!req.url.startsWith('/api/shorten') &&
|
||||
!req.url.startsWith('/api/user') &&
|
||||
!req.url.startsWith('/api/theme')
|
||||
) {
|
||||
if (!req.url.startsWith('/_next') && config.core.log) {
|
||||
const status =
|
||||
res.statusCode !== 200
|
||||
? bold(red(res.statusCode.toString()))
|
||||
|
||||
@@ -49,6 +49,7 @@ export interface ConfigCore {
|
||||
ratelimiter?: ConfigCoreRateLimiter;
|
||||
theme?: 'dark' | 'light';
|
||||
mfa?: boolean;
|
||||
log?: boolean;
|
||||
}
|
||||
|
||||
export interface ConfigWebhooks {
|
||||
|
||||
Reference in New Issue
Block a user