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

Function _makeCorsRequest

tests/unit/api/bucketGetCors.js:22–39  ·  view source on GitHub ↗
(xml)

Source from the content-addressed store, hash-verified

20};
21
22function _makeCorsRequest(xml) {
23 const request = {
24 bucketName,
25 headers: {
26 host: `${bucketName}.s3.amazonaws.com`,
27 },
28 url: '/?cors',
29 query: { cors: '' },
30 actionImplicitDenies: false,
31 };
32
33 if (xml) {
34 request.post = xml;
35 request.headers['content-md5'] = crypto.createHash('md5')
36 .update(request.post, 'utf8').digest('base64');
37 }
38 return request;
39}
40const testGetCorsRequest = _makeCorsRequest();
41
42function _comparePutGetXml(sampleXml, done) {

Callers 2

bucketGetCors.jsFile · 0.85
_comparePutGetXmlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected