fix scenario when you store files in AWS S3 bucket and / or CloudFront and not forcing to use http or https