Update middleware default function in docs.