Can't play the file. Enable CORS on your storage account

Veerla, Tirupati Raju 0 Reputation points
2024-11-04T07:34:45.2+00:00

User's image

User's image

I am reaching out for assistance with a CORS configuration issue related to our Azure Storage account used for video playback in the Video Indexer portal.

Currently, our CORS settings include the following rule:

  • Allowed Origins: https://*.videoindexer.ai

While this configuration allows the video to play correctly in the Video Indexer portal, our security team has raised a remediation issue. They have advised us to remove the wildcard ('*') from the Allowed Origins and replace it with a specific domain. However, when I attempt to replace the wildcard with a videoindexername, the video playback fails.

Could you please provide guidance on how to correctly configure the Allowed Origins for our CORS.

Azure AI Video Indexer
Azure AI Video Indexer
An Azure video analytics service that uses AI to extract actionable insights from stored videos.
84 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,962 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,944 questions
{count} votes

2 answers

Sort by: Most helpful
  1. romungi-MSFT 47,226 Reputation points Microsoft Employee
    2024-11-04T11:23:20.9666667+00:00

    @Veerla, Tirupati Raju it seems to work in my case. Can you enable browser developer mode and check how the request is made when you try to play the video? This should give you an idea of what is used in the exact URL and then you can try adding that in your CORS configuration. Did you also try to add just adding https://www.videoindexer.ai as origin since the initial request is sending this in the header.
    User's image

    I have also observed a new storage account with unlimited VI account is using the wildcard entry for CORS. So, this could be a case where the wildcard may be required in the allowed origin.

    1 person found this answer helpful.
    0 comments No comments

  2. Veerla, Tirupati Raju 0 Reputation points
    2024-11-04T12:28:52.61+00:00

    Thank you @romungi-MSFT for your assistance with the CORS configuration issue. I’m pleased to report that after adding https://www.videoindexer.ai to the Allowed Origins, the video is now playing successfully in the Video Indexer portal.

    I appreciate your support in resolving this matter!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.