Add new config use_path_based_img_url

Fix parseBitInt
This commit is contained in:
2024-06-02 13:33:46 +08:00
parent 329a91e9c0
commit 0ea6da38e4
8 changed files with 119 additions and 6 deletions

View File

@@ -167,6 +167,11 @@ export const handler: Handlers = {
);
const b = new URLSearchParams(bs.toString());
b.append("verify", tverify);
if (m.cfg.use_path_based_img_url) {
return Response.redirect(
`${get_host(req)}/thumbnail/${b}/${f.id}.jpg`,
);
}
return Response.redirect(
`${get_host(req)}/thumbnail/${f.id}?${b}`,
);