1. Ensure that you're using as least XFileSharingPro v.3.2 with a latest CDN mod package
2. Specify a special bucket name as follows in the "Add new CDN" dialog: bucket_name.endpoint_hostname (without slashes and 'https://').
Example in the case of nl-ams location of Scaleway S3-compatible Object Storage: yourbucketname.s3.nl-ams.scw.cloud