How to setup CORS for CDN Access
Last updated: May 23, 2025
Setup CORS Configuration
Configure S3 bucket permissions by granting appropriate access to the app0-async role
Set up CORS headers in your AWS configuration:
Add Access-Control-Allow-Origin header with value "*" to allow cross-origin requests
Apply these changes through your infrastructure-as-code (Terraform) configuration
Deploy the configuration changes to production environment
Verify the configuration by checking that your web application can successfully access resources from the CDN domain (cdn.cloud.app0.io)
Usage
Once configured correctly, your web application will be able to load scripts and other resources from the CDN without encountering CORS policy violations. For example, scripts like 'app0.dynamic-faq-product.js' should load successfully from any allowed domain.
If you continue to see CORS errors after configuration, verify that your changes have been properly propagated through your CDN cache.