Refactor: Add admin path to reserved list

This commit is contained in:
2025-10-11 05:39:05 -07:00
parent 5d73635309
commit 609090887c

View File

@@ -1,5 +1,5 @@
export async function onRequestGet({ request, params, env, next }) {
if (['dash', 'api', 'acceptable-use', 'abuse'].includes(params.slug)) return next();
if (['abuse', 'admin', 'api', 'dash', 'acceptable-use'].includes(params.slug)) return next();
try {
const dest = await env.KV_EV.get(params.slug);
const url = dest ? `https://${dest}` : new URL('/', request.url).href;