Function admin_force_index_handler

Source
pub async fn admin_force_index_handler(
    headers: HeaderMap,
    __arg1: State<AppState>,
) -> Result<Json<ForceIndexResponse>, StatusCode>
Expand description

HTTP handler for force indexing operations.

Forces immediate indexing of all allowed domains, bypassing the normal time-based checks. This endpoint requires admin authentication via the X-Admin-Key header. Individual domain failures are logged but do not cause the entire operation to fail.

§Headers

  • X-Admin-Key: Required admin API key for authentication

§Returns

  • 200 OK: JSON response confirming force indexing was initiated
  • 401 Unauthorized: If admin authentication fails

§Example

POST /admin/force-index
X-Admin-Key: your-admin-key