mirror of
https://github.com/4ev-link/4ev.link.git
synced 2026-01-13 16:18:05 +00:00
Fix: Exclude 'public' from slug capture
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
export async function onRequestGet({ request, params, env, next, waitUntil }) {
|
export async function onRequestGet({ request, params, env, next, waitUntil }) {
|
||||||
if (['abuse', 'admin', 'api', 'dash', 'acceptable-use', 'takedown', 'icon.png'].includes(params.slug)) return next();
|
if (['abuse', 'admin', 'api', 'dash', 'acceptable-use', 'takedown', 'public'].includes(params.slug)) return next();
|
||||||
try {
|
try {
|
||||||
let dest = await env.KV_EV.get(params.slug);
|
let dest = await env.KV_EV.get(params.slug);
|
||||||
if (dest?.startsWith('🚫')) return Response.redirect(new URL('/takedown', request.url).href, 302);
|
if (dest?.startsWith('🚫')) return Response.redirect(new URL('/takedown', request.url).href, 302);
|
||||||
|
|||||||
Reference in New Issue
Block a user