R2 objects giving 404 unless I use double-slash after my hostname

Okay so, whenever I try accessing objects through my custom domain (say cdn.example.com), they're all giving me a 404 error. I access them like this: https://cdn.example.com/object
I then decided to check the objects on the control panel. There was a list of urls (my domain and the S3 API domain) and they all had a double slash after the hostname. Because of this, I tried accessing my object like this: https://cdn.example.com//object and that actually worked.
Any ideas on how to fix this so I can access objects with just a single slash (as URLs are supposed to be)?
Was this page helpful?