Pass new object to middleware constructor to stop original options object from being modified