How to password protect staging environment?

Hello. Just want to know how you properly whitelisted the authorization headers in CloudFront? Added “auth_basic” in app.yml as given above. Password-protect is working when browsing via desktop but getting this when browsing via mobile (after entering user and password):




I have this in my “cdn-origin”:



“whitelist-authorization-headers” policy:

Fairly new to CloudFront and I might just be missing something very obvious (for mobile configuration).