Rediseno home: hero destacado, chips de genero, masonry + scroll infinito, busqueda publica /buscar, footer comunidad, status/queue protegidos
This commit is contained in:
+5
-8
@@ -24,17 +24,14 @@ const publicPrefixes = [
|
||||
// "/" es MATCH EXACTO (startsWith("/") matchearía TODO).
|
||||
// "/gallery/" incluye el lector: cualquiera puede LEER (GET); las acciones
|
||||
// del panel (eliminar, etc.) quedan protegidas por el middleware vía método.
|
||||
const publicPages = ["/p/", "/tag/", "/gallery/"]
|
||||
const publicPages = ["/p/", "/tag/", "/gallery/", "/buscar"]
|
||||
|
||||
// GET de lectura del proxy hacia el pipeline: públicos para que el lector
|
||||
// funcione sin login. POST/DELETE/PATCH (mutaciones) siempre requieren sesión.
|
||||
// GET de lectura del proxy hacia el pipeline: solo las rutas que el LECTOR
|
||||
// público necesita (páginas, summary, artifacts, cover). /status y /queue
|
||||
// exponen info operativa interna -> requieren sesión.
|
||||
function isPublicProxyRead(pathname: string, method: string): boolean {
|
||||
if (method !== "GET" && method !== "HEAD") return false
|
||||
return (
|
||||
pathname.startsWith("/api/proxy/galleries/") ||
|
||||
pathname === "/api/proxy/status" ||
|
||||
pathname === "/api/proxy/queue"
|
||||
)
|
||||
return pathname.startsWith("/api/proxy/galleries/")
|
||||
}
|
||||
|
||||
function isPublicPath(pathname: string, method: string): boolean {
|
||||
|
||||
Reference in New Issue
Block a user