How to Enable CORS Protection for Vultr CDN Push Zones
-
by Blog Admin
- 5
How to Enable CORS Protection for Vultr CDN Push Zones
Cross-Origin Resource Sharing (CORS) is a security feature that controls how web resources on one domain can be requested from another domain.
CORS Protection in Vultr CDN Push Zones allows you to manage and control which websites can access your content. This feature enhances the security of your resources by preventing unauthorized sites from making requests, ensuring that your content is only shared with approved and trusted domains. By configuring CORS protection, you maintain control over how your content is accessed and used across the web.
Follow this guide to enable the CORS protection feature for Vultr CDN Push Zones on your Vultr account using the Vultr Customer Portal, API, or CLI.
Vultr Customer Portal
- Navigate to Products, click CDN, and then click Push Zones.
- Click your target CDN Push Zone subscription to open its management page.
- Click Features.
- Select cors and click Update Features.
Vultr API
- Send a
GETrequest to the List CDN Push Zones endpoint and note the target Push Zone subscription’s ID.console$ curl "https://api.vultr.com/v2/cdns/push-zones" \ -X GET \ -H "Authorization: Bearer ${VULTR_API_KEY}"
- Send a
PUTrequest to the Update CDN Push Zone endpoint to enable cors protection feature for your target Push Zone subscription.console$ curl "https://api.vultr.com/v2/cdns/push-zones/{pushzone-id}" \ -X PUT \ -H "Authorization: Bearer ${VULTR_API_KEY}" \ -H "Content-Type: application/json" \ --data '{ "cors": true }'
Vultr CLI
- List all available CDN Push Zone subscriptions and note the target Push Zone subscription’s ID.
console
$ vultr-cli cdn push list - Enable cors protection feature for your target Push Zone subscription.
console
$ vultr-cli cdn push update <pushzone-id> --cors
How to Enable CORS Protection for Vultr CDN Push Zones Cross-Origin Resource Sharing (CORS) is a security feature that controls how web resources on one domain can be requested from another domain. CORS Protection in Vultr CDN Push Zones allows you to manage and control which websites can access your…
How to Enable CORS Protection for Vultr CDN Push Zones Cross-Origin Resource Sharing (CORS) is a security feature that controls how web resources on one domain can be requested from another domain. CORS Protection in Vultr CDN Push Zones allows you to manage and control which websites can access your…