fix: trimstart url

This commit is contained in:
Yanlong Wang 2024-05-30 20:29:31 +08:00
parent 33e14e5404
commit 0c15946874
No known key found for this signature in database
GPG Key ID: C0A623C0BADF9F37

View File

@ -547,7 +547,7 @@ ${suffixMixins.length ? `\n${suffixMixins.join('\n\n')}\n` : ''}`;
) {
const uid = await auth.solveUID();
let chargeAmount = 0;
const noSlashURL = ctx.req.url.slice(1);
const noSlashURL = ctx.req.url.slice(1).trimStart();
if (!noSlashURL) {
const latestUser = uid ? await auth.assertUser() : undefined;
if (!ctx.req.accepts('text/plain') && (ctx.req.accepts('text/json') || ctx.req.accepts('application/json'))) {