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:
@@ -14,6 +14,9 @@ const redisClient = createClient({
|
|||||||
});
|
});
|
||||||
|
|
||||||
app.use(async (c, next) => {
|
app.use(async (c, next) => {
|
||||||
|
if (c.req.path === "/health") {
|
||||||
|
return next();
|
||||||
|
}
|
||||||
const authHeader = c.req.header("X-API-Key");
|
const authHeader = c.req.header("X-API-Key");
|
||||||
|
|
||||||
if (process.env.API_KEY !== authHeader) {
|
if (process.env.API_KEY !== authHeader) {
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ const app = new Hono();
|
|||||||
cleanQueue();
|
cleanQueue();
|
||||||
|
|
||||||
app.use(async (c, next) => {
|
app.use(async (c, next) => {
|
||||||
|
if (c.req.path === "/health") {
|
||||||
|
return next();
|
||||||
|
}
|
||||||
const authHeader = c.req.header("X-API-Key");
|
const authHeader = c.req.header("X-API-Key");
|
||||||
|
|
||||||
if (process.env.API_KEY !== authHeader) {
|
if (process.env.API_KEY !== authHeader) {
|
||||||
|
|||||||
Reference in New Issue
Block a user