mirror of
https://github.com/lifegpc/eh-downloader.git
synced 2026-07-08 01:31:00 +08:00
Add new settings
This commit is contained in:
@@ -22,6 +22,9 @@ function handle_auth(req: Request, ctx: FreshContext) {
|
||||
if (u.pathname === "/api/health_check" && req.method === "GET") {
|
||||
return true;
|
||||
}
|
||||
if (m.cfg.random_file_secret && (u.pathname == "/api/file/random" || u.pathname.match(/^\/api\/file\/\d+/) || u.pathname.match(/^\/api\/thumbnail\/\d+/)) && req.method === "GET" && u.searchParams.get("token")) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
if (!token) return check();
|
||||
|
||||
Reference in New Issue
Block a user