Add CORS filter, make repositories more robust.