MCPcopy Index your code
hub / github.com/scality/cloudserver / routeNonObjectRequest

Function routeNonObjectRequest

lib/routes/routeBackbeat.js:1688–1704  ·  view source on GitHub ↗
(request, response, userInfo, log, callback)

Source from the content-addressed store, hash-verified

1686}
1687
1688function routeNonObjectRequest(request, response, userInfo, log, callback) {
1689 if (userInfo.getCanonicalID() === constants.publicId) {
1690 log.debug(`unauthenticated access to backbeat ${request.resourceType} routes`, {
1691 method: request.method,
1692 bucketName: request.bucketName,
1693 objectKey: request.objectKey,
1694 });
1695 return callback(errors.AccessDenied);
1696 }
1697
1698 if (request.resourceType === 'index') {
1699 return routeIndexingAPIs(request, response, userInfo, log, callback);
1700 }
1701
1702 const route = backbeatRoutes[request.method][request.resourceType];
1703 return route(request, response, userInfo, log, callback);
1704}
1705
1706function routeBackbeat(clientIP, request, response, log) {
1707 // Attach the apiMethod method to the request, so it can used by monitoring in the server

Callers 1

routeBackbeatFunction · 0.85

Calls 2

routeIndexingAPIsFunction · 0.85
debugMethod · 0.80

Tested by

no test coverage detected