• Object Storage Service

obs
  1. Help Center
  2. Object Storage Service
  3. Development Guide (Java SDK)
  4. CORS
  5. Deleting CORS Rules

Deleting CORS Rules

You can call ObsClient.deleteBucketCors to delete CORS rules of a bucket. Sample code is as follows:

String endPoint = "yourdomainname";
String ak = "*** Provide your Access Key ***";
String sk = "*** Provide your Secret Key ***";
// Create an instance of ObsClient.
ObsClient obsClient = new ObsClient(ak, sk, endPoint);

obsClient.deleteBucketCors("bucketname");

// Close obsClient. 
obsClient.close();