mirror of
https://github.com/ershisan99/coolify.git
synced 2025-12-24 12:33:17 +00:00
wip
This commit is contained in:
@@ -13,8 +13,12 @@ declare module '@fastify/jwt' {
|
||||
}
|
||||
|
||||
export default fp<FastifyJWTOptions>(async (fastify, opts) => {
|
||||
let secretKey = fastify.config.COOLIFY_SECRET_KEY_BETTER;
|
||||
if (!secretKey) {
|
||||
secretKey = fastify.config.COOLIFY_SECRET_KEY;
|
||||
}
|
||||
fastify.register(fastifyJwt, {
|
||||
secret: fastify.config.COOLIFY_SECRET_KEY_BETTER ?? fastify.config.COOLIFY_SECRET_KEY
|
||||
secret: secretKey
|
||||
});
|
||||
|
||||
fastify.decorate('authenticate', async function (request, reply) {
|
||||
|
||||
Reference in New Issue
Block a user