> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sevalla.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Object storage - Settings

> Configure object storage settings and access controls.

The object storage settings show the details required to access your files via an S3-compatible API. You can also enable public access and delete the object storage.

## Details

The object storage details contains the information you need to connect to your storage bucket via an S3-compatible API.

<Frame caption="Details of your object storage bucket.">
  <img className="block dark:hidden" alt="Details of your object storage bucket" src="https://mintcdn.com/sevalla/014zMlxS0XvA6M1e/images/object-storage-details-light.png?fit=max&auto=format&n=014zMlxS0XvA6M1e&q=85&s=fd6e29cfa90c222dd1fdcd9671cf0f22" width="2584" height="592" data-path="images/object-storage-details-light.png" />

  <img className="hidden dark:block" alt="Details of your object storage bucket" src="https://mintcdn.com/sevalla/014zMlxS0XvA6M1e/images/object-storage-details-dark.png?fit=max&auto=format&n=014zMlxS0XvA6M1e&q=85&s=b0a83af550cc7e165672f2d1ba6fc3a4" width="2590" height="592" data-path="images/object-storage-details-dark.png" />
</Frame>

### Roll secret

To rotate the access and secret keys for your object storage bucket without taking clients offline, click **Roll secret**. Choose when you want the old keys to expire, and click **Continue**.

<Frame caption="Roll your object storage secret in Sevalla.">
  <img className="block dark:hidden" alt="Roll your object storage secret in Sevalla" src="https://mintcdn.com/sevalla/014zMlxS0XvA6M1e/images/object-storage-roll-secret-light.png?fit=max&auto=format&n=014zMlxS0XvA6M1e&q=85&s=023153d20411b13c2676261d4470f09d" width="1040" height="620" data-path="images/object-storage-roll-secret-light.png" />

  <img className="hidden dark:block" alt="Roll your object storage secret in Sevalla" src="https://mintcdn.com/sevalla/014zMlxS0XvA6M1e/images/object-storage-roll-secret-dark.png?fit=max&auto=format&n=014zMlxS0XvA6M1e&q=85&s=59a11942a8dc4e5f91eb0e7300a905e6" width="1052" height="634" data-path="images/object-storage-roll-secret-dark.png" />
</Frame>

## CORS Policy

[Cross-Origin Resource Sharing (CORS)](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS) is a browser security feature that controls how web resources can be requested from a different origin (domain, protocol, or port) than the one the web page was loaded from. A CORS policy is a set of rules defined by a server to specify which external origins (domains, ports, or protocols) are allowed to access its resources via cross-origin HTTP requests. To set up a CORS Policy on your object storage bucket, click **Create rule**.

<Frame caption="Create a CORS Policy for your object storage bucket.">
  <img className="block dark:hidden" alt="Create a CORS Policy for your object storage bucket" src="https://mintcdn.com/sevalla/C-qCdL5Dtty3MHRR/images/object-storage-cors-light.png?fit=max&auto=format&n=C-qCdL5Dtty3MHRR&q=85&s=0c617c173e8ef9bd2d27b848d2fb74f6" width="2556" height="542" data-path="images/object-storage-cors-light.png" />

  <img className="hidden dark:block" alt="Create a CORS Policy for your object storage bucket" src="https://mintcdn.com/sevalla/C-qCdL5Dtty3MHRR/images/object-storage-cors-dark.png?fit=max&auto=format&n=C-qCdL5Dtty3MHRR&q=85&s=c591d138e69269ec370f223c16dabbb7" width="2564" height="554" data-path="images/object-storage-cors-dark.png" />
</Frame>

Complete the policy as follows:

* **Allowed methods:** This defines the value of the `Access-Control-Allow-Methods` header that R2 sets when a browser requests objects from your bucket. You can select any of the following HTTP methods: `GET`, `PUT`, `POST`, `DELETE`, and `HEAD`.
* **Allowed origin:** Specifies the value of the `Access-Control-Allow-Origin` header that R2 sets when a browser requests objects from your bucket. This is the origin from which the request is being made; for example, if the site `www.example.com` needs access to your bucket, enter `www.example.com` as the allowed origin.
* **Allowed header:** Defines the value for the `Access-Control-Allow-Headers` header that R2 sets when a browser sends cross-origin requests to your bucket. If your requests include custom headers, such as `x-user-id` or `x-auth-token`, you need to add them here so the browser permits them.

<Frame caption="Define your CORS policy.">
  <img className="block dark:hidden" alt="Define your CORS policy" src="https://mintcdn.com/sevalla/C-qCdL5Dtty3MHRR/images/object-storage-create-cors-light.png?fit=max&auto=format&n=C-qCdL5Dtty3MHRR&q=85&s=0cda447d585ea71bc76e9ccecb0bf424" width="984" height="792" data-path="images/object-storage-create-cors-light.png" />

  <img className="hidden dark:block" alt="Define your CORS policy" src="https://mintcdn.com/sevalla/C-qCdL5Dtty3MHRR/images/object-storage-create-cors-dark.png?fit=max&auto=format&n=C-qCdL5Dtty3MHRR&q=85&s=42326d1345c92d56c6a78a816deed20b" width="988" height="806" data-path="images/object-storage-create-cors-dark.png" />
</Frame>

If a network request is still blocked by your browser, look at the AllowedOrigins, AllowedMethods, and AllowedHeaders of the network request and ensure the CORS policy includes the correct information.

## Public access

By default, the object storage files are private. When you enable Public Access, the bucket is assigned a unique subdomain under **sevalla.storage** (e.g., my-bucket.sevalla.storage).

<Frame caption="Enable public access to your object storage instance.">
  <img className="block dark:hidden" alt="Enable public access to your object storage instance" src="https://mintcdn.com/sevalla/C-qCdL5Dtty3MHRR/images/object-storage-public-light.png?fit=max&auto=format&n=C-qCdL5Dtty3MHRR&q=85&s=1e7efd7809f030b6c11339cedeeddc04" width="2556" height="344" data-path="images/object-storage-public-light.png" />

  <img className="hidden dark:block" alt="Enable public access to your object storage instance" src="https://mintcdn.com/sevalla/C-qCdL5Dtty3MHRR/images/object-storage-public-dark.png?fit=max&auto=format&n=C-qCdL5Dtty3MHRR&q=85&s=f72b8ea1676d2875f2ad5331026fa713" width="2560" height="346" data-path="images/object-storage-public-dark.png" />
</Frame>

## Cache

Objects served from your bucket are cached on our global CDN. If freshly uploaded or replaced objects aren't being served yet, you can clear the cache yourself instead of waiting for it to expire.

To clear the cache, click **Purge cache**. This purges the CDN cache for your bucket, so the latest version of your objects is served immediately. The purge takes effect right away, and you'll get a confirmation once the cache is cleared.

<Info>
  Anyone with update access to the object storage can purge the cache.
</Info>

## Delete object storage

Deleting your object storage bucket permanently removes the bucket, all stored objects, and any associated credentials. Once deleted, the bucket and its contents cannot be recovered.

If you no longer need the object storage bucket, click **Delete object storage** and confirm the deletion.

<Frame caption="Delete object storage.">
  <img className="block dark:hidden" alt="Delete object storage" src="https://mintcdn.com/sevalla/C-qCdL5Dtty3MHRR/images/object-storage-delete-disk-light.png?fit=max&auto=format&n=C-qCdL5Dtty3MHRR&q=85&s=dd392566b899bdb9103475252e3e530c" width="2552" height="222" data-path="images/object-storage-delete-disk-light.png" />

  <img className="hidden dark:block" alt="Delete object storage" src="https://mintcdn.com/sevalla/C-qCdL5Dtty3MHRR/images/object-storage-delete-disk-dark.png?fit=max&auto=format&n=C-qCdL5Dtty3MHRR&q=85&s=f20d688c45b75a5b163b96fc431da9a1" width="2560" height="226" data-path="images/object-storage-delete-disk-dark.png" />
</Frame>
