What is CORS and why is it necessary?
- The Problem: Modern web browsers enforce a “Same-Origin Policy” to protect you from malicious websites. This policy prevents a web page (like the Labelbox app at
https://app.labelbox.com) from making requests to a different domain (like your storage bucket atyour-bucket.s3.amazonaws.com). - The Solution: A CORS policy is a small configuration file you add to your storage bucket. It acts as a permission slip, telling the browser, “It’s okay to allow requests from
https://app.labelbox.comto access files in this bucket.”
https://app.labelbox.com and https://editor.labelbox.com.
AWS S3
- Navigate to your S3 bucket in the AWS Console.
- Click the bucket name.
- Go to the Permissions tab.
- Scroll to the Cross-origin resource sharing (CORS) section, click Edit.
- Paste the provided policy into the editor and save.
- For more details on setting up CORS for your AWS S3 bucket, see these AWS docs.
Google Cloud Storage (GCS)
In the following commands, replace with your own bucket name (ex: gs://my-bucket)- Log in to the Google Cloud Platform console.
- Click the Activate Cloud Shell button in the top-right corner to open the Cloud Shell.
- In Cloud Shell, create a JSON file containing the CORS configuration by entering the following command:
- Apply the CORS configuration to the bucket using the following command:
- Check the CORS configuration using the following command:
Microsoft Azure
- Navigate to the your Storage Account in your Azure Portal.
- Under Settings, find Resource sharing (CORS).
- Select the Blob Service tab.
- Fill in the fields: Allowed origins (
https'//app.labelbox.com), Allowed methods (GET), etc. and save.

Troubleshooting
| Error message | Troubleshooting |
|---|---|
| Unable to detect proper CORS configuration | Ensure your cloud storage bucket has CORS configured with the following origins: https://app.labelbox.com and https://editor.labelbox.com. For more troubleshooting help, see: - AWS troubleshooting CORS - GCS troubleshooting CORS requests - Cross-Origin Resource Sharing (CORS) support for Azure Storage |