(req)
| 72 | } |
| 73 | |
| 74 | function _normalizeBackbeatRequest(req) { |
| 75 | /* eslint-disable no-param-reassign */ |
| 76 | const parsedUrl = url.parse(req.url, true); |
| 77 | req.path = _decodeURI(parsedUrl.pathname); |
| 78 | const pathArr = req.path.split('/'); |
| 79 | req.query = parsedUrl.query; |
| 80 | req.resourceType = pathArr[3]; |
| 81 | req.bucketName = pathArr[4]; |
| 82 | req.objectKey = pathArr.slice(5).join('/'); |
| 83 | req.actionImplicitDenies = false; |
| 84 | /* eslint-enable no-param-reassign */ |
| 85 | } |
| 86 | |
| 87 | function _isObjectRequest(req) { |
| 88 | return ['data', 'metadata', 'multiplebackenddata', 'multiplebackendmetadata'].includes(req.resourceType); |
no test coverage detected