This PR updates the S3 backend to automatically remove leading and trailing `/` characters so upgrades are less likely to encounter the error, as the previous version did not fail on such hostnames.
The check still captures cases where the user attempts to input a path or URL into the hostname field.