Ring spec based middleware