mirror of
https://github.com/lifegpc/eh-downloader.git
synced 2026-07-08 01:31:00 +08:00
Add docker file
This commit is contained in:
@@ -19,6 +19,7 @@ function handle_auth(req: Request, ctx: MiddlewareHandlerContext) {
|
||||
const check = () => {
|
||||
if (u.pathname === "/api/token" && req.method === "PUT") return true;
|
||||
if (u.pathname === "/api/status" && req.method === "GET") return true;
|
||||
if (u.pathname === "/api/health_check" && req.method === "GET") return true;
|
||||
return false;
|
||||
};
|
||||
if (!token) return check();
|
||||
|
||||
7
routes/api/health_check.ts
Normal file
7
routes/api/health_check.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { Handlers } from "$fresh/server.ts";
|
||||
|
||||
export const handler: Handlers = {
|
||||
GET(_req, _ctx) {
|
||||
return new Response("OK");
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user