site based middleware