I'm testing Amazon Cloudfront on a dev environment which is protected by .htaccess/.htpasswd.
The password protection on the dev server is causing all of the cloudfront.net assets to be password protected as well. And no username/password combination works (the poppin just keep asking for password again and again).
I cannot remove the password protection.
I have see this other topic Amazon Cloudfront and .htaccess with the same request.
When I add this code to mine, the password protection is not displayed.
My .htaccess file:
SetEnvIf User-Agent ^Amazon Cloudfront$ cdn
ErrorDocument 401 default
AuthName "ACCESS"
AuthUserFile /var/www/html/folder/.htpasswd
AuthType Basic
AuthGroupFile None
<RequireAny>
Require valid-user
Require env cdn
</RequireAny>
<Files "healthcheckfile.html">
Allow from all
Satisfy any
</Files>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…