fix middleware registration
Merge pull request #472 from owncloud/fix-container

Fix middleware