Skip to content

Commit 4b381f9

Browse files
Merge pull request #245547 from baanders/7-19-cors
ADT: Add CORS requirements
2 parents 59017a2 + 5a17ba3 commit 4b381f9

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

articles/digital-twins/how-to-use-3d-scenes-studio.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ titleSuffix: Azure Digital Twins
55
description: Learn how to use all the features of 3D Scenes Studio (preview) for Azure Digital Twins.
66
author: baanders
77
ms.author: baanders # Microsoft employees only
8-
ms.date: 02/27/2023
8+
ms.date: 07/19/2023
99
ms.topic: how-to
1010
ms.service: digital-twins
1111
ms.custom: event-tier1-build-2022
@@ -31,11 +31,27 @@ To use 3D Scenes Studio, you'll need the following resources:
3131
* A private container in the storage account. For instructions, see [Create a container](../storage/blobs/storage-quickstart-blobs-portal.md#create-a-container).
3232
* Take note of the *name* of your storage container to use later.
3333
* *Storage Blob Data Owner* or *Storage Blob Data Contributor* access to your storage resources. You can grant required roles at either the storage account level or the container level. For instructions and more information about permissions to Azure storage, see [Assign an Azure role](../storage/blobs/assign-azure-role-data-access.md?tabs=portal#assign-an-azure-role).
34+
* Configure CORS for your storage account (see details in the following sub-section).
3435

35-
You should also configure [CORS](/rest/api/storageservices/cross-origin-resource-sharing--cors--support-for-the-azure-storage-services) for your storage account, so that 3D Scenes Studio will be able to access your storage container. You can use the following [Azure CLI](/cli/azure/what-is-azure-cli) command to set the minimum required methods, origins, and headers. The command contains one placeholder for the name of your storage account.
36+
### Configure CORS
37+
38+
You'll need to configure [CORS](/rest/api/storageservices/cross-origin-resource-sharing--cors--support-for-the-azure-storage-services) for your storage account, so that 3D Scenes Studio will be able to access your storage container.
39+
40+
These CORS headers are always required:
41+
* Authorization
42+
* x-ms-version
43+
* x-ms-blob-type
44+
45+
These additional CORS headers are required if you're planning on using private links functionality:
46+
* Content-Type
47+
* Content-Length
48+
* x-ms-copy-source
49+
* x-ms-requires-sync
50+
51+
Below is the [Azure CLI](/cli/azure/what-is-azure-cli) command that will set the methods, origins, and headers listed above for CORS in your storage account. The command contains one placeholder for the name of your storage account.
3652

3753
```azurecli
38-
az storage cors add --services b --methods GET OPTIONS POST PUT --origins https://explorer.digitaltwins.azure.net --allowed-headers Authorization x-ms-version x-ms-blob-type --account-name <your-storage-account>
54+
az storage cors add --services b --methods GET OPTIONS POST PUT --origins https://explorer.digitaltwins.azure.net --allowed-headers Authorization Content-Type Content-Length x-ms-version x-ms-blob-type x-ms-copy-source x-ms-requires-sync --account-name <your-storage-account>
3955
```
4056

4157
Now you have all the necessary resources to work with scenes in 3D Scenes Studio.

0 commit comments

Comments
 (0)