Problem
If you are using a storage account other than the default storage account that was created during the Ravnur Media Services deployment, you will encounter CORS errors in the RMS Console. The CORS errors prevent the display of files in the storage account, and also you cannot upload files to the storage account. Essentially, any requests to the storage account will fail because of the CORS errors. You can view CORS errors in the browser's Developer Tools > Network tab:
The default storage created during RMS deployment includes these CORS rules. If you are using storage accounts outside of the managed resource group, you must add the CORS rules for the RMS Console to work properly.
Solution
Add CORS rules for the Azure Storage Account used by RMS. Learn about parameters from Azure documentation.
- Go to the Azure Portal > Storage Account (check the RMS Console Settings to find the name of the storage account)
- In the left-sidebar menu, select Settings > Resource sharing (CORS).
-
Create a new CORS rule:
- Allowed origins. Copy the hostname from the RMS Console and enter it in the field
- Allowed methods. Select all values. If you want to restrict the methods to currently used methods, select GET, POST, OPTIONS, PUT. However, as we extend the functionality of the RMS Console, beyond those methods, you may need to update the rule in the future to avoid errors.
-
Allowed headers. Enter
*
to permit all required headers -
Exposed headers. Enter
*
to expose all required headers -
Max age. Enter
3600
- Allowed origins. Copy the hostname from the RMS Console and enter it in the field
- Click Save in the upper-left corner to apply the CORS rule.
- To view the changes and verify that they are in effect, clear your browser cache. You can press Ctrl + F5 or Cmd + Shift + R to perform a hard refresh.
Testing
Perform an action, e. g. upload a video in the RMS Console and ensure no CORS errors appear in the Developer Tools > Network tab.
You have successfully set the CORS rules to prevent RMS Console errors.