Reputation: 23395
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)
Upvotes: 8
Views: 7389
Reputation: 179094
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).
Upvotes: 14