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

Method createBucketCorsRequest

tests/unit/helpers.js:335–351  ·  view source on GitHub ↗
(method, bucketName, body)

Source from the content-addressed store, hash-verified

333 }
334
335 createBucketCorsRequest(method, bucketName, body) {
336 const request = {
337 bucketName,
338 headers: {
339 host: `${bucketName}.s3.amazonaws.com`,
340 },
341 url: '/?cors',
342 query: { cors: '' },
343 actionImplicitDenies: false,
344 };
345 if (method === 'PUT') {
346 request.post = body || this.constructXml();
347 request.headers['content-md5'] = crypto.createHash('md5')
348 .update(request.post, 'utf8').digest('base64');
349 }
350 return request;
351 }
352}
353
354const objectLockTestUtils = {

Callers 4

setupBucketWithCorsFunction · 0.95
bucketPutCors.jsFile · 0.80

Calls 1

constructXmlMethod · 0.95

Tested by

no test coverage detected