Cross-Origin Resource Sharing (CORS) Protection in Vultr CDN Pull Zones provides you with the capability to manage which websites can access your content. This feature helps secure your resources by allowing you to specify approved domains and prevent unauthorized sites from making requests. By implementing CORS protection, you ensure that your content is only shared with trusted sources, enhancing both security and control over how your content is distributed and accessed.
Follow this guide to enable the CORS protection feature for Vultr CDN Pull Zones on your Vultr account using the Vultr Customer Portal, API, or CLI.
Send a GET
request to the List CDN Pull Zones endpoint and note the target Pull Zone subscription's ID.
$ curl "https://api.vultr.com/v2/cdns/pull-zones" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a PUT
request to the Update CDN Pull Zone endpoint to enable cors protection feature for your target Pull Zone subscription.
$ curl "https://api.vultr.com/v2/cdns/pull-zones/{pullzone-id}" \
-X PUT \
-H "Authorization: Bearer ${VULTR_API_KEY}" \
-H "Content-Type: application/json" \
--data '{
"cors": true
}'
List all available CDN Pull Zone subscriptions and note the target Pull Zone subscription's ID.
$ vultr-cli cdn pull list
Enable cors protection feature for your target Pull Zone subscription.
$ vultr-cli cdn pull update <pullzone-id> --cors
No comments yet.