Refactor: Add new static pages to reserved paths

This commit is contained in:
2025-10-10 14:12:16 -07:00
parent 2728d82275
commit 8bbfd5a419

View File

@@ -1,5 +1,5 @@
export async function onRequestGet({ request, params, env, next }) {
if (['dash', 'api'].includes(params.slug)) return next();
if (['dash', 'api', 'acceptable-use', 'abuse'].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;