OVH Community

Welcome to your community space. Ask questions, search for information, post content, and interact with other OVH Community members.

CloudFlare and Public Storage configuration


#1

Good day,
If you read this you are probably trying to configure CloudFlare with OVH Public Object Storage.

The documentation Configure a domain name on your Object Storage container states:

You can only use one of these DNS records at a time.

However, to have CloudFlare cache, you need to configure both

  • The CNAME is used for CloudFlare to find the OVH endpoint, which CloudFlare then presents (in the caching case) as the CF IPs. This will cause the OVH Public Storage to deny the request, as it’s DNS request doesn’t point to itself, but to the CF IPs. There fore you also need:
  • The TXT record, this will (in the CNAME case not pointing to OVH but to CF) have the OVH authorization succeed.

#2

Hello,

I’m not sure that this can be done, if you raise a ticket from within your OVH Account they’ll be able to see if our System Administration Team can make an exception.

Thanks,
@AnthonyR


#3

Hi @AnthonyR

I’ve been using it this way already for a client, no need for me to raise a ticket, other than to get this documented properly??


#4

Hi @HendrikV,

Is this approach still working for you? I’ve got the CNAME and TXT record set up but as soon as I turn on Cloudflare caching I get the Bad Request response. Digging in Cloudflare’s documentation the way to fix this is to use Workers but they come at a cost. Happy to pay them for this to work but would rather a free solution!

Thanks,
Jon


#5

Hey,

You ever got any solution for this ?

I am also trying to figure this out. Also opened a support ticket but still no luck.


#6

@JonJ @RahulD Yes it’s still working for me.

There are some cross site related tricks that you might need to enable on the object store, but I have it currently running for a client running Django behind www.domain, and the Object storage behind a static.domain both fronted by CloudFlare


#7

Yes, support etc. won’t be able to help you, it’s something that you need to understand together with OpenSwift/OpenStack documentation (Which is what OVH’s object storage is build on)

In CloudFlare (Put them on separate lines for clarity

  • Type: CNAME

  • Name <StaticName>

  • Content <ObjectStorageName>.auth-<cloudProjectNumber>.storage.<region_without_number>.cloud.ovh.net

  • Proxy Status OrangeCloud Proxied

  • Type TXT

  • Name _swift-remap.<StaticName>

  • Content <ObjectStorageName>.auth-<cloudProjectNumber>.storage.<region_without_number>.cloud.ovh.net


#8

For Cross Site Script (XCRF sp?) problems inside the browsers/javascript, you’ll need some extras:

curl -vi -XPUT -H "X-Auth-Token: <Token_You_Need_to_Get_From_ca.api.ovh.com>" -H "X-Container-Meta-Access-Control-Allow-Origin: *" https://storage.<region_WithoutNumber>.cloud.ovh.net/v1/AUTH_<CloudProjectNumber>/<ObjectStorageName>


#9

Whoops, somehow I missed this some far back, apologies, the ovh community site is quite “strange” especially w.r.t. languages as I had to search for this post as the direct link in the email didn’t get me here ;(


#10

Thank you so much for such detailed instructions. This is now working like a charm.

Thanks a alot. :slight_smile:


#11

I have small question.

How do I rename files with Swift. I went through the docs. They say to add this after URL.

https://docs.openstack.org/swift/latest/middleware.html#swift.common.middleware.s3api.s3response.S3ResponseBase
temp_url_expires=1323479485&inline&filename=My+Test+File.pdf

I created this URL :

bucket.auth-projectN.storage.gra.cloud.ovh.net/myupload_zip.md5hash?inline&filename=myupload.zip

Is there something I am missing.

PS: it’s a public container so I think signature is not required. But I am not the expert here.