Once again work around weird routing behavior

This commit is contained in:
regalijan 2023-10-19 16:51:06 -04:00
parent b2344718e9
commit afbea74028
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

@ -1,6 +1,11 @@
import { jsonError } from "../../../common.js";
export async function onRequest(context: RequestContext) {
const { pathname } = new URL(context.request.url);
if (pathname.endsWith("/metadata") || pathname.endsWith("/submit"))
return await context.next();
if (!(context.data.current_user.permissions & (1 << 5)))
return jsonError("Forbidden", 403);