Add config loader middleware