mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: add health path to middleware
This commit is contained in:
parent
9e4bac1386
commit
541728805f
@ -14,6 +14,9 @@ const redisClient = createClient({
|
||||
});
|
||||
|
||||
app.use(async (c, next) => {
|
||||
if (c.req.path === "/health") {
|
||||
return next();
|
||||
}
|
||||
const authHeader = c.req.header("X-API-Key");
|
||||
|
||||
if (process.env.API_KEY !== authHeader) {
|
||||
|
@ -12,6 +12,9 @@ const app = new Hono();
|
||||
cleanQueue();
|
||||
|
||||
app.use(async (c, next) => {
|
||||
if (c.req.path === "/health") {
|
||||
return next();
|
||||
}
|
||||
const authHeader = c.req.header("X-API-Key");
|
||||
|
||||
if (process.env.API_KEY !== authHeader) {
|
||||
|
Loading…
Reference in New Issue
Block a user