1
0
Fork 1
mirror of https://example.com synced 2024-11-23 12:06:39 +09:00

fix #10483 (2)

This commit is contained in:
naskya 2023-07-13 13:25:45 +00:00
parent f451e97505
commit c9448bb281

View file

@ -18,7 +18,7 @@ function getUserToken(ctx: Koa.BaseContext): string | null {
function compareOrigin(ctx: Koa.BaseContext): boolean {
function normalizeUrl(url?: string): string {
return slice( url.length - 1) : url) : "";
return url ? (url.endsWith("/") ? url.slice(0, url.length - 1) : url) : "";
}
const referer = ctx.headers["referer"];