# Hide Admin Route ## Why The `/api/pendientes` endpoint (admin-only) and `/api/reportes` endpoint are currently exposed at obvious routes, making them easy targets for attackers. By default, the admin panel URL is well-known or discoverable via route enumeration (`/admin`, `/admin/api/pendientes`, `/api/pendientes`). This increases the attack surface of the application. By obscuring or moving the admin route, we increase the effort required for attackers to find the admin panel, reducing the likelihood of unwanted access. ## What Changes - **New capability**: `route-obfuscation` — middleware-based approach to hide the admin API routes by redirecting access attempts and serving a 404 or custom page. - Modify server configuration to intercept requests to known admin API routes and return a 404 or redirect to a custom page. ## Capabilities ### New Capabilities - **route-obfuscation**: Protects admin routes (`/api/pendientes`, `/api/reportes`, `/api/locales/:id/*`) by returning a 404 response when accessed without authentication, without exposing the route listing in response to global route enumeration. ## Impact - Affects the server configuration in `server/index.js`. - Adds middleware to filter/admin route protection. - Does not change the API contract for authenticated users. - No database changes required.