MCPcopy
hub / github.com/scality/cloudserver / validateWebsiteHeader

Function validateWebsiteHeader

lib/api/apiUtils/object/websiteServing.js:99–102  ·  view source on GitHub ↗

* validateWebsiteHeader description] * @param {string} header - value of * x-amz-website-redirect-location header on a put * object (or similar request -- initiate mpu, object copy) * @return {boolean} true if valid, false if not

(header)

Source from the content-addressed store, hash-verified

97 * @return {boolean} true if valid, false if not
98 */
99function validateWebsiteHeader(header) {
100 return (!header || header.startsWith('/') ||
101 header.startsWith('http://') || header.startsWith('https://'));
102}
103
104/**
105 * appendWebsiteIndexDocument - append index to objectKey if necessary

Callers 3

initiateMultipartUploadFunction · 0.85
objectCopyFunction · 0.85
createAndStoreObjectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected