mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 17:03:49 +01:00
fix #10483
This commit is contained in:
parent
bfa2f045d2
commit
7b4de4125f
@ -18,7 +18,7 @@ function getUserToken(ctx: Koa.BaseContext): string | null {
|
|||||||
|
|
||||||
function compareOrigin(ctx: Koa.BaseContext): boolean {
|
function compareOrigin(ctx: Koa.BaseContext): boolean {
|
||||||
function normalizeUrl(url?: string): string {
|
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"];
|
const referer = ctx.headers["referer"];
|
||||||
|
Loading…
Reference in New Issue
Block a user