CORS Authentication

Cross-Origin Resource Sharing (CORS) will allow you to access items from an external cloud storage to be used on the platform for various needs. There are a few different methods you can use to enable CORS and what you'll need each method for.

Method 1: Enable the CORS Unblock extension

To use the Text Editor, you need to install and enable the CORS Unblock extension:

  1. Install the CORS Unblock extension.
  2. Pin the extension.
  3. When you go to the Text Editor, right-click on the extension.
  4. Hover over This Can Read and Change Site Data.
  5. Select the Text Editor’s link.

Method 2: Enable CORS in your integrated external storage

This method is required to ensure that your files are correctly authenticated and imported from external storages.

Amazon S3 bucket

  1. Go to your bucket.
  2. Go to Permissions.
  3. Insert this configuration in the CORS section:
[
    {
        "AllowedHeaders": [],
        "AllowedMethods": [
            "GET"
        ],
        "AllowedOrigins": [
            "*"
        ],
        "ExposeHeaders": []
    }
]
  1. Click Save changes.

For extra security, you should replace * in AllowedOrigins with the following domains:

GCP storage

Learn how to configure CORS on a GCP cloud storage bucket here.

In Step 2 of the provided link, you need to use the gsutil cors command to apply the configuration to your bucket. Find it below.

[
    {
        "origin": [
            "https://app.superannotate.com/",
            "https://editor.superannotate.com/"
        ],
        "method": [
            "GET"
        ],
        "maxAgeSeconds": 3600
    }
]

Azure blob storage

  1. Go to your Azure portal.
  2. Select Storage accounts.
  3. Go to your container.
  4. Under Settings, select Resource sharing (CORS).
  5. In the Blob service tab, set the values of these fields:
    • Allowed origins: *
    • Allowed methods: GET
    • Max age: preferred max age value in seconds. The value should be larger than 0. The standard value is 3600.
  6. For extra security, you should replace * in Allowed Origins with the following domains: