If you have restrictions on your origin, there are three ways to whitelist the CDN servers:
- via HTTP headers (recommended)
- via CDN servers’ IP addresses
- via CDN servers’ subnets
Info
We continually expand our network, so the list of servers changes constantly. If you fail to add the IP address of a new server or a subnet to the whitelist, users cannot access content from that edge server. We recommend writing a script that automatically updates your ACL. New IP addresses or subnets are added to our list 30-60 minutes before launching a new server.
Use the Add Request Headers option to set up a custom header.
We recommend this method as it does not require further updates once set up. In contrast, the list of IP addresses must be regularly updated.
Whitelist via IP addresses
You can fetch the IP addresses of the CDN servers by using this API request:
curl -i -X GET https://api.gcore.com/cdn/public-ip-list
Whitelist via subnets
You can fetch the IP addresses of the CDN subnets using this API request:
curl -i -X GET https://api.gcore.com/cdn/public-net-list