Use options hash for middleware