Enrolling devices through a reverse proxy returns 500 errors