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 SA CORS Unblock extension:
- Install the SA CORS Unblock extension.
 - Pin the extension.
 - When you go to the Text Editor, right-click on the extension.
 - Hover over This Can Read and Change Site Data.
 - 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
- Go to your bucket.
 - Go to Permissions.
 - Insert this configuration in the CORS section:
 
[
    {
        "AllowedHeaders": [],
        "AllowedMethods": [
            "GET"
        ],
        "AllowedOrigins": [
            "*"
        ],
        "ExposeHeaders": []
    }
]- 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
- Go to your Azure portal.
 - Select Storage accounts.
 - Go to your container.
 - Under Settings, select Resource sharing (CORS).
 - In the Blob service tab, set the values of these fields:
Allowed origins:*Allowed methods:GETMax age: preferred max age value in seconds. The value should be larger than 0. The standard value is 3600.
 - For extra security, you should replace 
*inAllowed Originswith the following domains: 
Updated 7 months ago