增加api验证

This commit is contained in:
zhl 2021-08-05 16:50:20 +08:00
parent ed64f30d26
commit 6d906615cd

View File

@ -31,10 +31,10 @@ export class ApiServer {
this.server.register(helmet, { hidePoweredBy: false }) this.server.register(helmet, { hidePoweredBy: false })
this.server.register(zTokenParserPlugin) this.server.register(zTokenParserPlugin)
// this.server.register(apiAuthPlugin, { this.server.register(apiAuthPlugin, {
// secret: config.api.token_secret, secret: config.api.token_secret,
// expiresIn: config.api.token_expiresIn, expiresIn: config.api.token_expiresIn,
// }) })
this.server.register(require('fastify-cors'), {}) this.server.register(require('fastify-cors'), {})
} }