I am implementing a cloudfront solution and would like to test / run it on my staging server, however staging is "protected" from the outside world by basic_auth.
I have tried entering a URL with the basic_auth username / password in it e.g user:[email protected] but CloudFront rejects this URL.
How can I allow Cloudfront / an origin to access my staging server?
(I am hosting on heroku, using rails 4)
We can do HTTP basic authentication URL with @ in password. We have to pass the credentials appended with the URL. The username and password must be added with the format − https://username:password@URL.
Because of the way web content caching works, most HTTP request headers are not forwarded from CloudFront to the origin server by default, including the Authorization
header needed for basic auth.
You'll need to whitelist the Authorization
header in the appropriate cache behavior(s).
http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesWhitelistHeaders
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With