Use as an origin

Use object storage

1. Go to the CDN tab and press Create CDN resource.

2. Select which Object Storage you want to use as a content source: public or private - and follow the instructions.

Use SFTP storage

Go to the CDN tab and press Create CDN resource.

To specify the Origin Source, use the following schema:

<storage name>.<hostname>

Both name and hostname can be found on the Storage tab > Storages > Details.

If your storage name is 12345-test and your hostname is ams.origin.gcdn.co, you should specify 12345-test.ams.origin.gcdn.co as the Origin Source. Read more about personal domain setup in the “Create and set a custom domain for the content delivery via CDN” guide.

Request content from CDN

Object storage is the origin

An addressing scheme where you specify the bucket at the beginning <bucket-name>.<location>.cloud.gcore.lu allows you to increase the security of your CDN usage because you hide the Hostname of your repository.

Use the following schema to request uploaded files:

http(s)://<Custom domain>/<folder*>/<file>

*If the folder was created in the bucket. If files were added to the root of the bucket - specify file names.

For example, you’ve:

  • used a bucket mybucket, S3 storage in the Luxembourg location s-ed1.cloud.gcore.lu
  • created a CDN resource for the storage with the Custom domain with cdn.example.com.

To request file picture.png, which was uploaded into the bucket, from CDN use the following URL:

http://cdn.example.com/picture.png

Note : By default, created buckets and all the stored files in buckets are private. To make a file public, read the article on ACL and policy or official documentation.

SFTP storage is the origin

Upload your files to the htdocs directory, but don’t specify the directory when requesting the content.

Path to the uploaded file in the storage:

sftp://12345-test@ams.origin.gcdn.co:2200/export/home/12345-test/htdocs/picture.png

If the CDN Custom domain is cdn.example.com, the URL to request the file from CDN will be:

http://cdn.example.com/picture.png