diff --git a/swh/objstorage/api/server.py b/swh/objstorage/api/server.py --- a/swh/objstorage/api/server.py +++ b/swh/objstorage/api/server.py @@ -122,16 +122,13 @@ """Initialize the remote api application. """ - app = SWHRemoteAPI() + client_max_size = config.get('client_max_size', 1024 * 1024 * 1024) + app = SWHRemoteAPI(client_max_size=client_max_size) # retro compatibility configuration settings app['config'] = config _cfg = config['objstorage'] app['objstorage'] = get_objstorage(_cfg['cls'], _cfg['args']) - client_max_size = config.get('client_max_size') - if client_max_size: - app._client_max_size = client_max_size - app.router.add_route('GET', '/', index) app.router.add_route('POST', '/check_config', check_config) app.router.add_route('POST', '/content/contains', contains)