增加fastify日志
This commit is contained in:
parent
23da1b425b
commit
e406aebf40
@ -20,7 +20,7 @@ export class AdminServer {
|
|||||||
server: FastifyInstance<Server, IncomingMessage, ServerResponse>
|
server: FastifyInstance<Server, IncomingMessage, ServerResponse>
|
||||||
|
|
||||||
public constructor() {
|
public constructor() {
|
||||||
this.server = fastify({ logger: true })
|
this.server = fastify({ logger: true, trustProxy: true })
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
this.server['jcname'] = '222'
|
this.server['jcname'] = '222'
|
||||||
this.registerPlugins()
|
this.registerPlugins()
|
||||||
|
@ -25,7 +25,7 @@ export class ApiServer {
|
|||||||
server: FastifyInstance<Server, IncomingMessage, ServerResponse>
|
server: FastifyInstance<Server, IncomingMessage, ServerResponse>
|
||||||
|
|
||||||
public constructor() {
|
public constructor() {
|
||||||
this.server = fastify({ logger: true })
|
this.server = fastify({ logger: true, trustProxy: true })
|
||||||
this.registerPlugins()
|
this.registerPlugins()
|
||||||
}
|
}
|
||||||
private registerPlugins() {
|
private registerPlugins() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user