Use middleware options instead of global configuration