Get Bucket CORSAdmin Scope

Note: Ensure you have installed the required package to use this SDK method.

The getCors() SDK method will return the current CORS configuration of a specific bucket in Stratus. The bucket reference used in the following code snippet is the component instance.

CORS of a bucket can be edited by any user that has or has been granted Write permission for Stratus component in the project, using the Profiles & Permissions section.

copy
const cors = await bucket.getCors();
console.log(cors);

Example of Expected Response

copy
{
    domain: 'https://zylkereclassifieds-779513891.development.catalystserverless.com',
    allowed_methods: [ 'HEAD', 'DELETE', 'POST', 'GET', 'PUT' ]
 }

Last Updated 2026-07-02 14:51:41 +0530 IST